简体   繁体   中英

Hibernate Tools - DAO generation

I am using the eclipse hibernate tools plug-in to reverse engineer my database. I spent my whole day looking for how to force the DAO generator to use HQL/Criteria with the session factory, transaction, etc.

Right now, if I have the table TABLE in my database, I obtain the DAO class TableHome. This class uses the persistence EntityManager.

I found tutorials using an older version of hibernate tools generating TableDAO instead, and this is what I exactly need.

Thank you very much.

Whether you're using Eclipse or not is unclear but if you are, maybe check if the Console Configuration used by the Code Generation module is not configured for JPA:

alt text http://docs.jboss.org/tools/2.1.0.Beta1/hibernatetools/html/images/plugins/plugins_2.png

See also

Use Salto-DB Eclipse plugin. It comes with all the stuff.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM