@@ -131,6 +131,7 @@ public function testUpdate()
131131 $ customer = $ this ->getMapping ()->eq ('id ' , 1 )->findOne ();
132132 $ original = $ customer ;
133133
134+ $ customer ['orders ' ][0 ]['fulfillment ' ] = ['employee_id ' => 2 ];
134135 $ customer ['orders ' ][0 ]['items ' ][1 ]['description ' ] = 'Jumbo Eggs ' ;
135136 $ customer ['orders ' ][0 ]['items ' ][] = ['id ' => 7 , 'description ' => 'Cheese ' , 'amount ' => 300 ];
136137
@@ -296,13 +297,17 @@ public function getMapping()
296297 ->withColumns ('description ' , 'amount ' )
297298 ->useAutoIncrement ();
298299
300+ $ fulfillment = (new Definition ('orders_fulfillments ' , ['order_id ' , 'employee_id ' ]));
301+
299302 $ item = (new Definition ('items ' ))
300303 ->withColumns ('id ' , 'description ' , 'amount ' , 'modified ' )
301304 ->withModificationData (['modified ' => '2019-01-02 03:04:05 ' ]);
302305
306+
303307 $ order = (new Definition ('orders ' ))
304308 ->withColumns ('id ' , 'date_created ' )
305309 ->withOne ($ discount , 'discount ' , 'order_id ' )
310+ ->withOne ($ fulfillment , 'fulfillment ' , 'order_id ' )
306311 ->withMany ($ item , 'items ' , 'order_id ' )
307312 ->withDeletionTimestamp ('date_deleted ' );
308313
@@ -343,4 +348,3 @@ public function getReadOnlyMapping()
343348 return new Mapping ($ this ->db , $ customer );
344349 }
345350}
346-
0 commit comments