- This topic has 5 replies, 2 voices, and was last updated 19 years, 11 months ago by
Riyad Kalla.
-
AuthorPosts
-
enolan@idc-global.comMemberI have already tried the example using the DB browser to creat a hibernat mapping from a table to a newly created java task. That is
the opposite direction fromWhat I really want to do is to generate both the hbm.xml and DDL
from XDoclet marked up pojos. I run XDoclet but am not getting any
generated hbm.xml files.For now, I’ll work on just using ANT to do what I want. Is there any way
within the MyEclipse support to manually add a class to the hibernate.cfg.xml file and have XDoclet generate the corresponding
hbm.xml file?
Riyad KallaMemberMyEclipse support to manually add a class to the hibernate.cfg.xml file and have XDoclet generate the corresponding
hbm.xml file?There is not currently suppose for this direction of generation.
enolan@idc-global.comMemberOk, hibernate.cfg.xml has to be manually updated.
I could use some help on configuring XDoclet to generate the hbm.xml files from my Java files.
What properties need to be set in MyEclipse-XDoclet : Standard Hibernate : hibernatedoclet?
Riyad KallaMemberWhat properties need to be set in MyEclipse-XDoclet : Standard Hibernate : hibernatedoclet?
Yes exactly, you want to enable the Hibernate doclet task, and then in your individual POJOs you want to mark up them up with standard XDoclet Hibernate tags, please see this for reference: http://xdoclet.sourceforge.net/xdoclet/tags/hibernate-tags.html
I’m sorry if this is more vague then what you are looking for, while MyEclipse does support XDoclet and provides content assist for it, XDoclet is a huge beast, one of the MANY things it supports is Hibernate and I am not that versed with the XDoclet hibernate tags, I’ve only used them a few times.
enolan@idc-global.comMemberThe tags are not the issue. I know and understand them. The problem was getting XDoclet to do the right thing.
I finally figured it out and thought I would write it up to create a path for someone else like myself.
To configure XDoclet to generate hbm.xml files, go to:
Project->Properties
Select MyEclipse-XDoclet
Click AddStandard and select Add the Standard Hibernate.
Remove the hibernatdoclet->hibernate entry as it contains a lower case version vs. the expected Version.
Add the hibernate entry and set the Version appropriately.
Make sure that the hibernatedoclet destDir property is set to where the hbm.xml files should go.The one general comment about XDoclet and Hibernate is that if you do not see your POJO’s echoed during the build,
then the hbm.xml files were not generated.Hope this helps.
Riyad KallaMemberI finally figured it out and thought I would write it up to create a path for someone else like myself.
Thank you for posting your solution, I appologize for misunderstanding your request earlier.
-
AuthorPosts