NullPointerException with indexed Collections

Description

This mapping throws

<class name="Parent">
<id name="Id">
<generator class="native"/>
</id>
<list name="Children"
cascade="all-delete-orphan"
inverse="false">
<key column ="Parent" not-null="true"/>
<index column ="IndexOrder" />
<one-to-many class="Child"/>
</list>
</class>

<class name="Child">
<id name="Id">
<generator class="native"/>
</id>
<many-to-one name="Parent"
not-null="true"
update="false"
insert="false"/>
</class>

=>

at NHibernate.Envers.Entities.Mapper.Relation.Lazy.Initializor.ListCollectionInitializor`1.AddToCollection(IList`1 collection, Object collectionRow)
at NHibernate.Envers.Entities.Mapper.Relation.Lazy.Initializor.AbstractCollectionInitializor`1.Initialize()
at NHibernate.Envers.Entities.Mapper.Relation.Lazy.Proxy.CollectionProxyInterceptor.getOrInitTarget()
at NHibernate.Envers.Entities.Mapper.Relation.Lazy.Proxy.CollectionProxyInterceptor.Intercept(InvocationInfo info)
at IList`1Proxy.GetEnumerator()
at System.Linq.Enumerable.<OfTypeIterator>d__92`1.MoveNext()
at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)

Most probably same issue as
https://hibernate.atlassian.net/browse/HHH-7940

Environment

None

Activity

Show:

Details

Assignee

Reporter

Components

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created January 18, 2018 at 1:39 PM
Updated January 23, 2018 at 3:12 PM
Who's Looking?