Page 1 of 1

About Question enthuware.oce-jpad.v6.2.559 :

Posted: Sun Mar 18, 2012 4:37 am
by M_Z
Although option B is fine, the explanation is not accurate:
It depends on whether a field or a property (i.e. a getter method for id) is annotated with @Id.
It also depends on <access> element (see JPA 2.0 specification section 12.2.3.2).
Remember that @Id must be present for every entity class (or its superclass).
ID may be provided in object-relation mapping file instead of @Id annotation, like:

Code: Select all

<attributes>
    <id name="my_id_property" />
</attributes>

Re: About Question enthuware.oce-jpad.v6.2.559 :

Posted: Mon Mar 19, 2012 6:58 am
by admin
Explanation has been appropriately modified.

thank you for your feedback!