Glassfish V2 Build 24.
As per Section 10.1.3.22:
"The id subelement [of <entity><attributes></attributes></entity>] overrides the
mapping for the specified field or property."
Now, consider the scenario where an Entity class E1 exists with @GeneratedValue
and @TableGenerator annotations on its id field and has the following mapping in
<id name="identifier" />
(Note that NO other mapping elements are defined in the orm.xml under <id>;
options do exist to define <generated-value>, <table-generator> etc under <id>)
Current Result: The @GeneratedValue and the @TableGenerator annotations apply on
the id field and are not overridden by the empty children of <id>.
It seems that different persistence providers could decide to either apply the
annotations or have the above <id> mapping override the annotations such that no
mappings apply to the id field. This can make this feature non-portable?
The behaviour of this scenario can be determined after the spec clearly defines it.