-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Problem when genarating hbm.xmls from annotations
PostPosted: Mon Mar 03, 2008 12:00 pm 
Newbie

Joined: Mon Mar 03, 2008 10:27 am
Posts: 2
I am genarating hbm.xml files from annotated java classes. Attributes set in the annotations eg. (fetch = FetchType.EAGER/FetchType.LAZY, cascade = CascadeType.ALL/CascadeType.REFRESH) are not reflected in the generated hbm.xml files.

Here are my settings:
-------------------------------------------------------------------------------------
Annoation:
@OneToMany(targetEntity = com.xx.Period.class, fetch = FetchType.EAGER, cascade = CascadeType.ALL)
@JoinColumns( { @JoinColumn(name = "\"Fk_LoanId\"") })
private Set periods;
-------------------------------------------------------------------------------------

Ant -Generation:
<target name="an2hbm" depends="compile" description="Generate hbm files">

<taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="project.class.path" />

<taskdef name="annotationconfiguration" classname="org.hibernate.tool.ant.AnnotationConfigurationTask" classpathref="project.class.path" />

<hibernatetool destdir="${gen.root}/hbm">

<classpath>
<path location="${class.root}" />
</classpath>

<annotationconfiguration configurationfile="${config.dir}/SubTrxHibernate.cfg.xml" />

<hbm2hbmxml />
</hibernatetool>
</target>

------------------------------------------------------------------------------------

Target platform: java 1.4 (annotatations removed), hbm.xml-files, hibernate 3.2.5

How can I get the attributes (eg. fetch=, cascade=) generated to the hbm.xmls?

Many Thanx & Best Regards,

Jpropeller


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 05, 2008 12:00 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
implement/fix the missing tags in the templates and submit the patch to our jira.

thanks ,)

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.