• 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
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Merge detached sub-class entity (JPA InheritanceType.SINGLE_TABLE) org.hibernate.WrongClassException

 
Ranch Hand
Posts: 491
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
(Not sure what the issue is, could be Java related or flow design.
the title may be misleading (99% ?), but for the background, I put below 5 points. 1M Thanks.)


1. Simple Object Model: ProspectCustomer extends Customer
2. I use Restful GET to find the prospect customer. I got the returned prospect customer in the form of JSON.
3. I use Restful PUT to update the prospect customer. [In the backend, JPA used merge operation.]




4. For debugging, If I changed Customer to ProspectCustomer in Rest code as below, then it's OK for JPA code.



5. Now, if I want to keep Customer parameter (not ProspectCustomer) in my Rest code, then what need to be done in terms of correction?


===============================================================================

 
H Paul
Ranch Hand
Posts: 491
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Changed made to Code for point 3: JPA code . Worked.


 
Shiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic