We're updating the issue view to help you get more done. 

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

Status

Assignee

Unassigned

Reporter

Roger Kratz