Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to give edit query in hibernates

 
sure nandu
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai friends,
iam very new to hibernates world.iam comfortable with
selecting from database. i wanted to know how to give edit command.

i wanted equivalent of following sql command.

"update technology set tech_name='struts' where tech_name='springs'";

thanks in advance. regards
nandu
 
pascal betz
Ranch Hand
Posts: 547
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you update the entity and then call update() on the hibernate Session or
you update the entity while it is still attached to the Session (then the changed will be persisted when session is flushed/closed/tx commited).

If you start with Hibernate without any documentation then you might get some of the concepts wrong and build bad applications. Get yourself a book on hibernate or read the hibernate online documentation.


Pascal
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic