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

nullifyTransientReferences

 
srini carry
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was looking into hibernate code in performsaveorupdate It calls ForeignKeys.nullifyTransientReferences this method nullifies treansient instances from an entity I don,t know when this would nullify transient instances , can
hibernate gurus here explain me what this methd does ?
 
Trilochan Bharadwaj
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
did a bit of digging, here we go and I think Hibernate folks need someone to javadoc their stuff dammit! (and format their source, perhaps?):


If a foreign key points to a transient instance ... your SQL flush is definitely going to fail ... so its safe to nullify.


Trilochan.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic