Hi,
I have a few problems when generating the hbm files and pojo's with middlegen, hbm2java and importing them in hibernate.
First and foremost:
- How do you generate or map something of type Blob (MySQL db)
using the task and gui for middlegen?
With all the proposed types in the GUI it just gives me at runtime
in hibernate a message of the following type:
Could not interpret property type: {selected type}
I had to manually update my hbm to have as type 'blob', which is
not what I intended to have: a round-trip (model db extra's, run
build script with middlegen/hbm2java/compile).
- I also have a few m:n tables in a database, and each table has a
prefix (t_...). Now, middlegen, or cglib or whatever makes of my
foreign keys things like 'tPublicAppearance' when that field points
to 't_public_appearance'.
All is well until I want to include it into hibernate's sessionfactory at
runtime. All of the sudden hibernate complains that there is no
setter (and getter?) for the property tPublicAppearance, while there
is indeed a setter in the generated pojo called setTPublicAppearance.
Is there something I'm doing wrong or assuming wrong? (like: round
trip my ass, you have to always modify manually your hbm files because
middlegen and hibernate do not play nice with each other on other things
then trivial Long->Long and String->String mappings).
Pls help, because I've spent the last 24hrs 18hrs on narrowing this bug
down.
thnx,
Dimitri Smits[/b]
|