• Post Reply Bookmark Topic Watch Topic
  • New Topic

CascadeType.PERSIST not working

 
Duran Harris
Ranch Hand
Posts: 608
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys..

Could someone please point out to me where I might be going wrong?I'm trying to make sure that when an Item is persisted it's bids get persisted as well...I am using this property in my persistence.xml:

At the moment I can persist a bid or an item but persisting an Item will only result in an Item being added to the item table,not it's related Bids..
I have the following two entities(modified from the ActionBazaar app):



And finally the entity manager code(in my bean's business method):


 
God is a comedian playing for an audience that is afraid to laugh - Voltair. tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!