• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with JPA Embeddable class field in Embedded

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a Embeddable class and Embadded in all of my JPA Entities, the version(in DBUniqueId) field is mandatory for some JPA Entities and for others it should not be present.

My DBUser.java JPA Entity shouldn't have version field(DBUser table doesn't have one) and so I didn't include it in @AttributeOverrides of DBUser.java. when I try to run the JPA query it results in exception

Query:

And The Exception is:
How do I inform to JPA Entity to ignore only the version field of the Embeddable in my JPA Entity @Embedded place.
So the above query can successful. Thank You!

Please guide me to solve this problem.









 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic