@@ -163,12 +163,30 @@ public function createIndex($config): self
163163        }
164164
165165        foreach  ($ config'fields ' ] as  $ property
166+             $ isNullablefalse ;
167+             if  (is_array ($ property
168+                 if  (!array_key_exists ('property ' , $ property
169+                     throw  new  Exception ("Invalid property configuration " );
170+                 }
171+                 if  (array_key_exists ('is_nullable ' , $ property
172+                     $ isNullable$ property'is_nullable ' ];
173+                 }
174+                 $ property$ property'property ' ];
175+             }
176+             if  ($ this isPropertyNullable ($ property$ isNullable
177+                 $ this setPropertyNullable ($ property$ isNullable
178+             }
166179            if  (!$ this getPropertyType ($ property
167180                throw  new  Exception ("Unknown property  $ property , 1 );
168181            }
169-             $ options'parts ' ][] = $ this getPropertyIndex ($ property1 ;
170-             $ options'parts ' ][] = $ this getPropertyType ($ property
171-             $ this setPropertyNullable ($ propertyfalse );
182+             $ part
183+                 'field '  => $ this getPropertyIndex ($ property1 ,
184+                 'type '  => $ this getPropertyType ($ property
185+             ];
186+             if  ($ this isPropertyNullable ($ property
187+                 $ part'is_nullable ' ] = true ;
188+             }
189+             $ options'parts ' ][] = $ part
172190        }
173191
174192        $ namearray_key_exists ('name ' , $ config$ config'name ' ] : implode ('_ ' , $ config'fields ' ]);
0 commit comments