wood burning stoves*
The moose likes EJB and other Java EE Technologies and the fly likes Problem with JPA Embeddable class field in  Embedded Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Problem with JPA Embeddable class field in  Embedded" Watch "Problem with JPA Embeddable class field in  Embedded" New topic
Author

Problem with JPA Embeddable class field in Embedded

Sudeesh Naidu
Greenhorn

Joined: Jan 09, 2012
Posts: 3
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.









 
wood burning stoves
 
subject: Problem with JPA Embeddable class field in Embedded
 
Similar Threads
JPA Auto Incrementing EmbeddedId (Composit primary key values).
How to map a class that has an object that is defined as @Embeddable
JPA Auto Incrementing EmbeddedId (Composit primary key values).
EJB3 Beta Certification - EntityManager BASIC notes. (PART II)
Edit primary key, if it's a foreign key