AbstractFlushingEventListener has an issue with property-ref collections

Description

When using a collection with its key mapped with a property-ref which is null when the collection is loaded, the collectionEntry is not fully validated (LoadedPersister is not null but LoadedKey is), causing the creation of an invalid CollectionKey, which results in a crash.

I can't provide a good failing test now (the one I have is tied to a sick legacy model that I'm working with), but this patch did the job for me, by preventing the error.

I'm not sure if it's a good solution; maybe the LoadedKey should be updated instead, but I'm not familiar enough with the NH codebase.

Environment

None

Attachments

1

Activity

Show:

Alex Zaytsev 
April 27, 2017 at 4:22 AM

Closing as incomplete. If wish to reopen the issue please submit a failing test case.

Fabio Maulo 
January 17, 2010 at 8:14 PM

Patch without failing test is not accepted.

Incomplete

Details

Assignee

Reporter

Labels

Components

Priority

Who's Looking?

Open Who's Looking?
Created December 24, 2009 at 5:29 AM
Updated April 27, 2017 at 4:22 AM
Resolved April 27, 2017 at 4:22 AM
Who's Looking?