• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

no find method in session object

 
Mike London
Ranch Hand
Posts: 1216
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Following a simple example, I initialized the Hibernate objects as shown on the Hibernate Website.

However, when I try to "Search" using the "sess" object below, the only "F" method is "Flush()".

Any ideas why I'm not seeing a "Find" in the list of possible methods given the setup below?

Thanks in advance.

Mike

// Initialize the Hibernate environment
Configuration cfg = new Configuration().configure();

// Create the session factory
SessionFactory fact = cfg.buildSessionFactory();

// Obtain the new session object
Session sess = factory.openSession();

Then,....
List users = sess.F(lush) is only method that shows up (no Find)
[ February 05, 2007: Message edited by: Bear Bibeault ]
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's no find() method on the Session interface. You do have get() and load() methods. Here's the javadoc for Session interface
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
WHY ARE YOU YELLING?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65335
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My eyes couldn't take it anymore. I modified the topic title to lower case.

Mike, please avoid all uppercase in future posts, thanks.
 
Mike London
Ranch Hand
Posts: 1216
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

I wasn't even ...aware my posting was in upper case.

I was mostly posting code directly from an article off the Internet and asking questions about it.

Sorry 'bout that.

Mike
 
Mike London
Ranch Hand
Posts: 1216
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, now I remember. I posted the message subject in upper case.

I wasn't thinking at the time that it was "yelling". I think my caps lock key was on at that point.

I'll be (a lot) more careful from now on. <s>

M
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic