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

Cascading persist operations

 
Amandeep Singh
Ranch Hand
Posts: 850
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i do have parent-child relationship between two classes CarBillingInfo and Car classes.

in Car.java
---------------
@OneToOne(cascade=CascadeType.PERSIST)
protected CarBillingInfo carBillingInfo;
---------------

So when i do persist, Car.java, so does it means that primary key for Car table will also be inserted into CarBillingInfo table.

But i tried this, it doesn't happened in my case.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic