Re: [hibernate-dev] Composite IDs with a null property/field

2019-12-11 Thread Emmanuel Bernard
My answer is that if the code change looks too impactful I'm fine with no supporting such scenario. On 11 Dec 2019, at 11:24, Joerg Baesner wrote: > > ... I suppose some means it as default. > > Yes, exactly. > > Your reply doesn't answer the question if Hibernate shouldn't support > this > sc

Re: [hibernate-dev] Composite IDs with a null property/field

2019-12-11 Thread Joerg Baesner
> ... I suppose some means it as default. Yes, exactly. Your reply doesn't answer the question if Hibernate shouldn't support this scenario. Anyhow, what Gail already wrote is that Hibernate returns null for the entity result, leading to a null value in a returned ResultList, which seem to be wr

Re: [hibernate-dev] Composite IDs with a null property/field

2019-12-11 Thread Emmanuel Bernard
We have been trying to keep a balance of maintainable code base for Hibernate vs legacy/counter intuitive/plain wrong DB designs. The answer is never clear cut. In your case I'm not sure what a bundle + key means if it does not have a locale - I suppose some means it as default. On 11 Dec 2019,

Re: [hibernate-dev] Composite IDs with a null property/field

2019-12-11 Thread Joerg Baesner
> I think in the past we argued the same for attributes of a composite id, > like you said, if one of the element can be nul, why is it in the id > property in the first place. As an example you might Imagine someone wants to put internationalization properties into a database and having a table s

Re: [hibernate-dev] Composite IDs with a null property/field

2019-12-11 Thread Emmanuel Bernard
Just talking about simple id, even if we allow the column to be nullable (if the DB even allows that), I don't think Hibernate allows null to be a valid id value. Because null means I don't know or not applicable. I think in the past we argued the same for attributes of a composite id, like you