File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
src/DotNetToolkit.Repository.NHibernate/Internal Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -41,13 +41,20 @@ public string GetColumnName(PropertyInfo pi)
4141 }
4242
4343 public bool IsColumnMapped ( PropertyInfo pi )
44- => GetPropertyNames ( pi ) . Contains ( pi . Name ) ;
44+ => GetPropertyNames ( pi )
45+ . Contains ( pi . Name ) ;
4546
4647 private string [ ] GetPropertyNames ( PropertyInfo pi )
4748 {
4849 var persister = GetAbstractEntityPersister ( Guard . NotNull ( pi , nameof ( pi ) ) . DeclaringType ) ;
4950
50- return persister . KeyColumnNames . Concat ( persister . PropertyNames ) . ToArray ( ) ;
51+ if ( persister == null )
52+ return new string [ ] { } ;
53+
54+ return persister
55+ . KeyColumnNames
56+ . Concat ( persister . PropertyNames )
57+ . ToArray ( ) ;
5158 }
5259
5360 private AbstractEntityPersister GetAbstractEntityPersister ( Type entityType )
You can’t perform that action at this time.
0 commit comments