Re: [hibernate-dev] Statements issued for unidirectional one-to-many with @JoinColumn

2016-01-22 Thread Steve Ebersole
I would look at 2 things as I mentioned on HipChat yesterday... 1) Hibernate does have some capacity to do what you are expecting. There are definitely some limitations to it. But the idea is called a "backref". When building the metamodel for this, Hibernate should inject 2 synthetic backref p

Re: [hibernate-dev] Statements issued for unidirectional one-to-many with @JoinColumn

2016-01-22 Thread Gunnar Morling
Hi Gail, Also with that PR I am still seeing the extra updates during insert. Regarding merging, which case exactly do you mean? If I add another element to the Parent#children association, I see INSERT+UPDATE for that, too. Is it that what you mean? --Gunnar 2016-01-21 22:50 GMT+01:00 Gail Bad

Re: [hibernate-dev] Statements issued for unidirectional one-to-many with @JoinColumn

2016-01-21 Thread Gail Badner
Actually, that pull request will only affect merging transient entities. Are you seeing the extra updates when merging? On Thu, Jan 21, 2016 at 1:09 PM, Gail Badner wrote: > Hi Gunnar, > > Can you try using this pull request for HHH-9979 [1] to see if the extra > updates go away? > > This pull r

Re: [hibernate-dev] Statements issued for unidirectional one-to-many with @JoinColumn

2016-01-21 Thread Gail Badner
Hi Gunnar, Can you try using this pull request for HHH-9979 [1] to see if the extra updates go away? This pull request is already closed because I am going to use new OperationContext functionality to fix HHH-9979. I know this pull request does get rid of some updates, and the future one will as

[hibernate-dev] Statements issued for unidirectional one-to-many with @JoinColumn

2016-01-21 Thread Gunnar Morling
Steve, all, I have a model with two entities, Parent and Child, and an unidirectional one-to-many association from the former to the latter. Via @JoinColumn on the association it is ensured that the Parent FK is stored in the Child table, i.e. without a separate join table. When inserting a Paren