From andrea at hibernate.org Wed May 9 06:10:13 2018 Content-Type: multipart/mixed; boundary="===============9084596878961314517==" MIME-Version: 1.0 From: andrea boriero To: hibernate-dev at lists.jboss.org Subject: Re: [hibernate-dev] JPA XML ORM descriptors id-class and id Date: Wed, 09 May 2018 11:09:51 +0100 Message-ID: In-Reply-To: CAFDzhiTVd5XD8WYVi45DmjaAX10oGHJZPnM=kN4OmS3V2+yeLQ@mail.gmail.com --===============9084596878961314517== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable For the IdClass annotation the spec states that the "The Id annotation must also be applied to the corresponding fields or properties of the entity.". So in my opinion the XML ORM should follow the same rule. On 8 May 2018 at 23:13, Gail Badner wrote: > When an entity with an IdClass is mapped using XML ORM descriptors, > Hibernate requires the Id properties to be mapped as well, as in the > following example: > > > > > > > > > > > > If the elements are not included, an exception is thrown: > > "No identifier specified for entity: ..." > > Should Hibernate require the elements to be explicitly mapped, or > should it be able to determine this information by reflection from the > class configured by ? > > Regards, > Gail > _______________________________________________ > hibernate-dev mailing list > hibernate-dev(a)lists.jboss.org > https://lists.jboss.org/mailman/listinfo/hibernate-dev > --===============9084596878961314517==--