[hibernate-dev] HHH-12007

Gail Badner gbadner at redhat.com
Wed Nov 15 15:05:27 EST 2017


Yes, your right, it's
AbstractEntityTuplizer#determineEntityIdPersistIfNecessary.

AFAICT, in most cases, it got resolved by forcing cascade-persist to
the key-many-to-one associations.

In the one test that failed,
DerivedIdentitySimpleParentIdClassDepTest,
IncrediblySillyJpaMapsIdMappedIdentifierValueMarshaller#setIdentifier
is called before cascade-persist, so the association is not in the PC
yet. The fix was to simply get the key-many-to-one association from
the entity itself.

Thanks for looking,
Gail

On Wed, Nov 15, 2017 at 10:30 AM, Steve Ebersole <steve at hibernate.org> wrote:
> I'll assume you mean AbstractEntityTuplizer#persistTransientEntity, as
> called from  IncrediblySillyJpaMapsIdMappedIdentifierValueMarshaller via
> org.hibernate.tuple.entity.AbstractEntityTuplizer#determineEntityIdPersistIfNecessary[1]
> - if that's not correct let us know.
>
> With that assumption... It is quite possible that whatever problem this code
> was trying to solve got resolved a different way rendering this change
> unnecessary anymore.  I'm not sure what I could add here though.
>
> [1] there is no
> IncrediblySillyJpaMapsIdMappeddentifierValueMarshaller#persistTransientEntity
> method.
>
> On Mon, Nov 13, 2017 at 8:42 PM Gail Badner <gbadner at redhat.com> wrote:
>>
>> Hi Steve,
>>
>> The test case for HHH-12087 shows that executing a query that has a
>> transient entity bound to it will cause that transient entity to be
>> persisted.
>>
>> Please take a look at the PR for HHH-12087:
>>
>> https://github.com/hibernate/hibernate-orm/pull/2054
>>
>> It removes
>> IncrediblySillyJpaMapsIdMappedIdentifierValueMarshaller#persistTransientEntity
>> and, AFAICT, doesn't break anything.
>>
>> Thanks,
>> Gail


More information about the hibernate-dev mailing list