- This topic has 19 replies, 6 voices, and was last updated 20 years, 3 months ago by tarantula.
-
AuthorPosts
-
support-jeffMembersnpe –
Yep, understood. My point was just that the ME Hibernate tool does not use xdoclet to do the mapping and java class generation – custom Velocity templates are. If you choose to add xdoclet tags to your source code with which to generate mapping files, you are on your own – these will get overwritten by the ME tool if you ever choose to re-generate mappings and the abstract base classes.
snpeMemberBut, You can set xdoclet tags when generate java code from mapping files
tarantulaParticipantOk. The generated Hibernate XML files clearly say “do not edit” because changes would be wiped out during synchronization. I see that the hibernate.cfg.xml file is synchronized each time you export a table, but when does synchronization happen for the *.hbm.xml mapping files? Is it only the first time or can I sync them up again with my base classes later on? It would be great to have round-trip engineering here where I could right-click on a mapping file and go “Hibernate->Synchronize” to keep the xml in sync with the Java code and vice versa.
My question is, sometimes the resulting files still need some modification to get the column types and entity-relational mappings right so I would like to find a way to update these files without having my changes wiped out. Can I provide my own custom Velocity templates (eg. for application or database-specific settings) or can I modify the existing ones? If so, a tutorial would be handy.
support-jeffMember* hibernate.cfg,xml – synchronized when you create mapping files
* mapping files – not synchronized at this time; (re)generated at direction of the user from tables thru DB Explorer (hence the warning – any manual changes in the files will be lost)
* abstract base class – not sync’d at this time; (re)generated at direction of the user when mapping files created (hence the warning here too)
* subclass – only created once, the first time a mapping is created for the table – therefore safe to modifySynchronization and customized mappings are in the future – ME 3.9 and beyond.
tarantulaParticipantjeff,
Thank you. The tool is working great for me now. I’m looking forward to the new features. Keep up the fine work!
tarantula
-
AuthorPosts