About Question enthuware.oce-jpad.v6.2.424 :
Moderators: Site Manager, fjwalraven
-
- Posts: 8
- Joined: Sun Jan 25, 2015 6:08 am
- Contact:
About Question enthuware.oce-jpad.v6.2.424 :
Can you please explain why the 4th answer is incorrect? It is not mandatory to create an @IdClass or @EmbeddableId mapping to map multiple Id attributes, so in my opinion the 4th answer is also correct.
-
- Posts: 8
- Joined: Sun Jan 25, 2015 6:08 am
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.424 :
Oh, never mind. I've checked the jpa 2.0 specs, and it says that you need either an EmbeddedId or an IdClass to map a composite id.
Although, I'm really sure that EclipseLink allows multiple @Id attributes without an @IdClass annotation, so I think that's the reason why I was convinced about the correctness of the 4th answer. Naughty naughty eclipselink for not adhering the JPA standards
Although, I'm really sure that EclipseLink allows multiple @Id attributes without an @IdClass annotation, so I think that's the reason why I was convinced about the correctness of the 4th answer. Naughty naughty eclipselink for not adhering the JPA standards
-
- Posts: 39
- Joined: Thu Jan 29, 2015 4:49 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.424 :
Spec says:
• The primary key class must be serializable.
• The primary key class must define equals and hashCode methods. The semantics of value
equality for these methods must be consistent with the database equality for the database types to which the key is mapped.
Please change your EmployeePK class.
• The primary key class must be serializable.
• The primary key class must define equals and hashCode methods. The semantics of value
equality for these methods must be consistent with the database equality for the database types to which the key is mapped.
Please change your EmployeePK class.
-
- Site Admin
- Posts: 10036
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.424 :
Added.
thank you for your feedback!
thank you for your feedback!
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 19 guests