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

Unwanted SELECTs on session flush (HIBERNATE Wrong)

 
Elias Hujair
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
my question about what does hibernate do on flush in the OneToMany relations ??
I will explain the problem with a simple example:
I have three entities A,B,C
A-B one to many
B-C one to many

I have one object from A and it container 10 children from B. and there is no objects from C

the mistake is when I load the A object from database and change any proberty then try to update it . on flush there is unwanted select commands

the first is select from B . but then there is 10 select commands from C but no objects exist from C in the database

so what is the wrong that causes this problem > Any help Please
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic