• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate session.load() method doubt

 
Vivek Raj
Ranch Hand
Posts: 33
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am new to Hibernate and was practicing a simple example to save() and load() the data.

I have set <property name = "show_sql">true</property>, to see the queries generated by Hibernate.

When saving the data using session.save() I can see the insert queries, but I cannot see any queries when executing the session.load(). For session.load() I can see the select queries only when I try to actually print the data using SOP.

I have created my class using main for testing the load():


 
Nam Ha Minh
Ranch Hand
Posts: 512
Eclipse IDE Firefox Browser Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does the Javadoc of Session.load() say about?
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!