- This topic has 4 replies, 4 voices, and was last updated 18 years, 2 months ago by qnob.
-
AuthorPosts
-
Thomas TrostelParticipantI’ve been using MyEclipse for about a year and a half now. One thing I really like is the Hibernate mapping feature. Unfortunately with the latest version there seems to be a problem. No matter what I do with the latest version it seems to want to add the new POJO items to the default package. I have specified the package carefuly as before in the past but it stubbornly does not want to put them there.
Is this a new bug? Can you generate POJOs in specified packages correctly? Is there a patch somewhere for this bug?
Thanks
Tom
Thomas TrostelParticipantFound the answer to my own question. There was a bad reverse engineering file left in the directory. The program won’t change the directory for generation once it has been set.
Brian FernandesModeratorTom,
Glad you’re back on track, but I’d like to find out what went wrong in the first place.
You should be able to set the source folder and package each time you invoke the RE process (if you want to).When you said “bad reverse engineering file” what file were you referring to? Also, were there any errors in your log?
I’m assuming you’re using MyEclipse 4.1.1 – are you also using any other Hibernate tools?
Best,
Brian.
jrobertsMemberIf I may jump in….
Looks like if you set the package, then change the class names for the tables without specifing the complete class it will put everything in the default package.
Example:
I set the package to hibernate.pojo
I have the tables prefixed with a T_, so I set the class name for the table T_Checks to the class name: Check
Click finish and it will put the generated classes and mappings in the default package.To work around this, put the full class name, so hibernate.pojo.Check instead of just Check.
The reverse engineering file I believe he is refering to is the hibernate.reveng.xmlAt least with using the linux version of 4.1.1
qnobMemberIv’got the same problem with ME 5.0.1. In addition, there was as strange behavior when I entered the src path and package name. The Assistent didn’t want to accept it. It said that the given package wouldn’t exist.
After a few attemps to get my mapping correctly, the assistant accepted my package. However, the sources were still generated to the default behavior. Finally, I’ve found the workaround above.
-
AuthorPosts