The following is in the patch. This patch is based on a question I posted
earlier today
(http://sourceforge.net/forum/forum.php?thread_id=912698&forum_id=128638),
but got no bites on. 

I did have to change the build to work with hibernate-2.0.2 as the build.xml
was looking for ../../hibernate-2.0/lib. 

I fixed two problems here.

1)Only findAll was getting generated, no matter how many finder-method's
were defined at the property level. To fix this, I simply changed the value
of MT_FINDERMETHOD from "finder" to "finder-method".
2)The wrong SQL or HQL was getting generated for the findAll() method.
Basically, it had "from className in class package.className" and hibernate
was complaining by something like: "unexpected token: in [from Organization
in class net.sf.jameleon.jdo.Organization]". I took out the text "in class
package.ClassName" for the findAll method generation code.

I hope this helps.



Attachment: hbm2java.patch
Description: Binary data

Reply via email to