• Post Reply Bookmark Topic Watch Topic
  • New Topic

Cascading persist operations  RSS feed

 
Amandeep Singh
Ranch Hand
Posts: 853
  • 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
Boost this thread!