Browse Source

Added required columns to the child relationship

Kenric Nugteren 1 năm trước cách đây
mục cha
commit
f81556e419
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      InABox.Core/ILookupDefinition.cs

+ 5 - 0
InABox.Core/ILookupDefinition.cs

@@ -240,6 +240,11 @@ namespace InABox.Core
         {
             var columns = Columns.Create(TLookup);
 
+            foreach(var prop in DatabaseSchema.Properties(TLookup).Where(x => x.Required))
+            {
+                columns.Add(prop.Name);
+            }
+
             // Add any columns defined on a LookupDefinitionAttribute
             var generator = GetChildGenerator(TEntity, TLookup);
             if(generator != null)