• Post Reply Bookmark Topic Watch Topic
  • New Topic

@OneToMany Example  RSS feed

 
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!