-->
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.  [ 1 post ] 
Author Message
 Post subject: Generating *Home.java classes with HibernateUtil inside
PostPosted: Thu Aug 16, 2007 2:41 pm 
Newbie

Joined: Thu Aug 16, 2007 2:25 pm
Posts: 5
Hibernate version: 3.2.5.ga

Hi,
I read in http://hibernate.org/42.html#A11 about the HibernateUtil class. This class works perfectly in my web application (including c3p0 pool).

But,
the Hibernate Tools, in the Reverse Engineering option, always generate two classes for each table: <TABLE_NAME>.java and <TABLE_NAME>Home.java.

The generated <TABLE_NAME>Home.java don't use my HibernateUtil.java to open the session. Is possible to make Hibernate Tools generate the class whitout the
Code:
getSessionFactory()
method, and using
Code:
HibernateUtil.getSession()
instead
Code:
sessionFactory.getCurrentSession()
?

Thanks the support.

_________________
Rodrigo Avila
rodrigo@avila.eti.br

http://www.avila.eti.br


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

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.