• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hibernate property

 
manu chaox
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to generate dao classes from database tables via Hibernate.

I need generate all dao classes save method with returning type a object, but it still generate me save method without returning type(void).
(Merge mehods have returning type.)

What property should I set in hibernate.cfg.xml to generating dao classes with save method with returning type a object?


Could you help me, please?
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you doing this? How are you getting Hibernate to create DAOs for you? Is there a tool you are using? An Eclipse plugin or something? Maybe Hibernate Tools?

The DAO pattern can be done very easily using Java 5 Generics and a little elbow grease. Here's a tutorial I put together on how to create some very effective and powerful Data Access Objects:

Creating Data Access Objects with Java 5 Generics and Hibernate + JPA

-Cameron McKenzie
 
manu chaox
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use MyEclipse plugin and generate by "Hibernate reveerse engineering".
(Hibernate 3.2 + Sping 1.2)
[ September 09, 2008: Message edited by: manu chaox ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic