• Post Reply Bookmark Topic Watch Topic
  • New Topic

@OneToMany Example

 
Nikhil Jain
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I tried the above piece of code. When
 
Nikhil Jain
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I tried the above piece of code. When I comment cc.setId(2), I get constraint violation error. But in of the O'Rel examples, there were no setId method. Am I missing something here.

Secondly, the above code works with setId... But I have'nt called persist() method. So from where is the persist method being called?

Thanks
 
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!