private void BindCollectionIndex(IIndexedCollectionMapping listMapping, IndexedCollection model) { SimpleValue iv = null; if (listMapping.ListIndex != null) { iv = new SimpleValue(model.CollectionTable); new ValuePropertyBinder(iv, Mappings).BindSimpleValue(listMapping.ListIndex, IndexedCollection.DefaultIndexColumnName, model.IsOneToMany); } else if (listMapping.Index != null) { iv = new SimpleValue(model.CollectionTable); listMapping.Index.type = NHibernateUtil.Int32.Name; new ValuePropertyBinder(iv, Mappings).BindSimpleValue(listMapping.Index, IndexedCollection.DefaultIndexColumnName, model.IsOneToMany); } if (iv != null) { if (iv.ColumnSpan > 1) { log.Error("This shouldn't happen, check BindIntegerValue"); } model.Index = iv; } }
private void BindCollectionIndex(IIndexedCollectionMapping listMapping, IndexedCollection model) { SimpleValue iv = null; if (listMapping.ListIndex != null) { iv = new SimpleValue(model.CollectionTable); new ValuePropertyBinder(iv, Mappings).BindSimpleValue(listMapping.ListIndex, IndexedCollection.DefaultIndexColumnName, model.IsOneToMany); } else if (listMapping.Index != null) { iv = new SimpleValue(model.CollectionTable); listMapping.Index.type = NHibernateUtil.Int32.Name; new ValuePropertyBinder(iv, Mappings).BindSimpleValue(listMapping.Index, IndexedCollection.DefaultIndexColumnName, model.IsOneToMany); } if (iv != null) { if (iv.ColumnSpan > 1) log.Error("This shouldn't happen, check BindIntegerValue"); model.Index = iv; } }