-->
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.  [ 4 posts ] 
Author Message
 Post subject: H3 hbm2java generating finders?
PostPosted: Wed Jun 01, 2005 5:57 pm 
Expert
Expert

Joined: Wed Apr 06, 2005 5:03 pm
Posts: 273
Location: Salt Lake City, Utah, USA
Hibernate version:3.0.5

Does H3 hbm2java support <meta attribute="finder-method">? I searched the forums and the only posts related to 'finder-method' were in H2. The H2 docs say to create a codegen xml file, but the H3 ant tasks don't seem to have a way to point to the file.

The H2 doc says:

Quote:
The second is to create a config file for hbm2java of the format:

Code:
<codegen>
    <generate renderer="net.sf.hibernate.tool.hbm2java.BasicRenderer"/>
    <generate suffix="Finder" renderer="net.sf.hibernate.tool.hbm2java.FinderRenderer"/>
</codegen>


And then use the param to hbm2java --config=xxx.xml where xxx.xml is the config file you just created.


I don't know how to pass --config to hbm2java. Maybe the new ant tasks don't support finders yet??

Unfortunately, I have no experience with generating finders in H2, so I might be missing something obvious.

Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 02, 2005 2:09 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
noone has contributed the community maintained finder generation for H3.

contributions are welcome ;)

We do though have a DAO generator in cvs.

/max

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 02, 2005 10:03 am 
Expert
Expert

Joined: Wed Apr 06, 2005 5:03 pm
Posts: 273
Location: Salt Lake City, Utah, USA
Thanks for the response. I am building from CVS, and did notice some DAO template stuff in there. How do I get that working? Is there documentation for it in CVS as well?


Top
 Profile  
 
 Post subject: generating DAOs from hbm
PostPosted: Tue Nov 22, 2005 5:17 pm 
Newbie

Joined: Tue Sep 28, 2004 2:03 pm
Posts: 9
Location: Fullerton, CA
Add <hbm2dao/> to your codegen task...


Code:
<target name="ant-prepare">
    <taskdef name="hibernate" classpathref="classpath"
      classname="org.hibernate.tool.ant.HibernateToolTask"/>
</target>

<target name="codegen" depends="ant-prepare">
  <mkdir dir="${gen}"/>
  <hibernate destdir="${gen}">
    <classpath refid="classpath"/>
    <configuration configurationfile="${src}/hibernate.cfg.xml"/>
    <hbm2java/>
    <hbm2dao/>
  </hibernate>
</target>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.