• 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.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!