Re: [hibernate-dev] Natural IDs and inheritance (HHH-12085)

2017-11-10 Thread Steve Ebersole
Sorry, I misunderstood what you were asking. TBH I'm not sure what to think of this yet. On Fri, Nov 10, 2017 at 3:08 PM Steve Ebersole wrote: > https://hibernate.atlassian.net/browse/HHH-7129 > > > On Fri, Nov 10, 2017 at 2:37 PM Gail Badner wrote: > >> IIUC, a natural ID should apply to an e

Re: [hibernate-dev] Natural IDs and inheritance (HHH-12085)

2017-11-10 Thread Steve Ebersole
https://hibernate.atlassian.net/browse/HHH-7129 On Fri, Nov 10, 2017 at 2:37 PM Gail Badner wrote: > IIUC, a natural ID should apply to an entire entity hierarchy. Is that > true? > > HHH-12085 reports a "bug" when a natural ID is mapped on a non-root > entity. Is that expected? Is this somethi

[hibernate-dev] Natural IDs and inheritance (HHH-12085)

2017-11-10 Thread Gail Badner
IIUC, a natural ID should apply to an entire entity hierarchy. Is that true? HHH-12085 reports a "bug" when a natural ID is mapped on a non-root entity. Is that expected? Is this something we may want to support in the future? Thanks, Gail ___ hibernate

Re: [hibernate-dev] Natural ids and inheritance

2012-03-01 Thread Steve Ebersole
Thats not legal definition of natural ids. Only the *root entity* can define natural ids, here A. On Thu 01 Mar 2012 11:11:47 AM CST, Demetz, Guenther wrote: > Hi Steve, > >>> Caching should be using the root persister of the hierarchy for cache keys. > > Hm, it probably depends on how you fix

Re: [hibernate-dev] Natural ids and inheritance

2012-03-01 Thread Demetz, Guenther
Hi Steve, >> Caching should be using the root persister of the hierarchy for cache keys. Hm, it probably depends on how you fixed HHH-7129. Is following hierarchy allowed after HHH-7129 ? @Entity class A { @Id int id; } @Entity class Subclass1 extends A { @NaturalId String name; } @

Re: [hibernate-dev] Natural ids and inheritance

2012-03-01 Thread Demetz, Guenther
Hi Steve, >> Caching should be using the root persister of the hierarchy for cache keys. Not precisely. Please take a look at following example: class A { @Id int id; } class B extends A On 03/01/2012 04:09 AM, Demetz, Guenther wrote: >>> I will open regarding issue with testcase

Re: [hibernate-dev] Natural ids and inheritance

2012-03-01 Thread Steve Ebersole
ards > Günther Demetz > > -Original Message- > From: hibernate-dev-boun...@lists.jboss.org > [mailto:hibernate-dev-boun...@lists.jboss.org] On Behalf Of Steve Ebersole > Sent: Thursday, March 01, 2012 1:16 PM > To: hibernate-dev@lists.jboss.org > Subject: Re: [hibernate-dev] N

Re: [hibernate-dev] Natural ids and inheritance

2012-03-01 Thread Demetz, Guenther
] On Behalf Of Steve Ebersole Sent: Thursday, March 01, 2012 1:16 PM To: hibernate-dev@lists.jboss.org Subject: Re: [hibernate-dev] Natural ids and inheritance (articlenumber) is already unique. So what is the point of (articlenumber,cartonId)? Your description and proposed fix of HHH-7113 all

Re: [hibernate-dev] Natural ids and inheritance

2012-03-01 Thread Steve Ebersole
(articlenumber) is already unique. So what is the point of (articlenumber,cartonId)? Your description and proposed fix of HHH-7113 all centered around choosing the "right persister" to use for cache keys, so I naturally assumed the problem was due to the unsupported way you were defining the

Re: [hibernate-dev] Natural ids and inheritance

2012-03-01 Thread Demetz, Guenther
>> I will open regarding issue with testcase asap. Opened https://hibernate.onjira.com/browse/HHH-7133 regards G.Demetz ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev

Re: [hibernate-dev] Natural ids and inheritance

2012-03-01 Thread Demetz, Guenther
John Verhaeg wrote: I probably don't understand the complexities with this, but wouldn't the ID values in AA have to be completely independent of the values in A? Yes, that's exactly what I'd expected originally and that's it what would be a nice to have ! In our model for example we have fol

Re: [hibernate-dev] Natural ids and inheritance

2012-02-28 Thread John Verhaeg
I probably don't understand the complexities with this, but wouldn't the ID values in AA have to be completely independent of the values in A? > On 28 févr. 2012, at 17:59, Steve Ebersole wrote: > >> Another discrepancy between hbm.xml and annotations currently is the >> definition of natural i

Re: [hibernate-dev] Natural ids and inheritance

2012-02-28 Thread Emmanuel Bernard
On 28 févr. 2012, at 17:59, Steve Ebersole wrote: > Another discrepancy between hbm.xml and annotations currently is the > definition of natural ids. hbm.xml only allows natural ids to be > defined on the root entity, annotations allow it to be defined on any > level of the hierarchy, even ac

[hibernate-dev] Natural ids and inheritance

2012-02-28 Thread Steve Ebersole
Another discrepancy between hbm.xml and annotations currently is the definition of natural ids. hbm.xml only allows natural ids to be defined on the root entity, annotations allow it to be defined on any level of the hierarchy, even across classes. We need to decide what we want to support. 2