-->
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.  [ 2 posts ] 
Author Message
 Post subject: How do I get the SessionFactory?
PostPosted: Sat Dec 24, 2011 2:52 pm 
Newbie

Joined: Fri Dec 23, 2011 7:40 pm
Posts: 12
I'm using Hibernate with HSQLDB via JPA in Eclipse.
I want to have an array column, so I'm trying to follow the instructions at viewtopic.php?t=946973
One of the compile problem is that I need a reference to the SessionFactory so I can make this method work:
Code:
public static Settings getSettings(){
        return ((SessionFactoryImpl)factory).getSettings();
    }

Since my existing code can use the database, I figure there must be an instance of the SessionFactory SOMEWHERE.
How do I get a reference to it?

(Has anyone else updated this UserType code to something recent? It looks like I'll also have to implement nullSafeSet() and nullSafeGet() for the types in this very old class.)


Top
 Profile  
 
 Post subject: Re: How do I get the SessionFactory?
PostPosted: Sat Dec 24, 2011 7:10 pm 
Newbie

Joined: Fri Dec 23, 2011 7:40 pm
Posts: 12
I figured out how to modify the code to not need that value. (though it still might be nice to know how to get it.)


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