• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Cascade Type problem

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
Is there any clue how using CascadeType in bidirectional relationship?
for example :
I have two tables 1 is Customers and second is FormOrder ( owner of relationship)


The problem is when I insert new record in FormOrder which also specify new Customer, this code should be working. ( since this is not default JPA to persist related entity , so that we are using CascadeType.persist)


The fact is annoying me since there are a message "javax.persistence.EntityExistsException:
Exception Description: Cannot persist detached object"

Any clue would be greatly accepted.

Thanks in advance.
 
masse Satriana
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
Case is closed.
This all is my failure not seeing duplicated data on table FormOrder.
All code in my previous post is working fine.

Regards,
Masse Satriana
 
Could you hold this kitten for a sec? I need to adjust this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic