@@ -433,6 +433,9 @@ public void testDataTypes() throws IOException {
433433 Property .uuidArray ("prop_uuid_array" ),
434434 Property .textArray ("prop_text_array" ),
435435 Property .object ("prop_object" ,
436+ p -> p .nestedProperties (
437+ Property .text ("marco" ))),
438+ Property .objectArray ("prop_object_array" ,
436439 p -> p .nestedProperties (
437440 Property .text ("marco" )))));
438441
@@ -454,7 +457,8 @@ public void testDataTypes() throws IOException {
454457 Map .entry ("prop_date_array" , List .of (now , now )),
455458 Map .entry ("prop_uuid_array" , List .of (uuid , uuid )),
456459 Map .entry ("prop_text_array" , List .of ("a" , "b" , "c" )),
457- Map .entry ("prop_object" , Map .of ("marco" , "polo" )));
460+ Map .entry ("prop_object" , Map .of ("marco" , "polo" )),
461+ Map .entry ("prop_object_array" , List .of (Map .of ("marco" , "polo" ))));
458462
459463 // Act
460464 var object = types .data .insert (want );
@@ -483,19 +487,31 @@ public void testNestedProperties_insertMany() throws IOException {
483487 nsBuildings , c -> c .properties (
484488 Property .object ("address" , p -> p .nestedProperties (
485489 Property .text ("street" ),
486- Property .integer ("buildingNr" ),
487- Property .bool ("isOneWay" )))));
490+ Property .integer ("building_nr" ),
491+ Property .bool ("isOneWay" ))),
492+ Property .objectArray ("apartments" , p -> p .nestedProperties (
493+ Property .integer ("door_nr" ),
494+ Property .number ("area" )))));
488495
489496 var buildings = client .collections .use (nsBuildings );
490497
491- Map <String , Object > house_1 = Map .of ("address" , Map .of (
492- "street" , "Burggasse" ,
493- "building_nr" , 51 ,
494- "isOneWay" , true ));
495- Map <String , Object > house_2 = Map .of ("address" , new Address (
496- "Port Mariland St." ,
497- 111 ,
498- false ));
498+ Map <String , Object > house_1 = Map .of (
499+ "address" , Map .of (
500+ "street" , "Burggasse" ,
501+ "building_nr" , 51 ,
502+ "isOneWay" , true ),
503+ "apartments" , List .of (
504+ Map .of ("door_nr" , 11 , "area" , 42.2 ),
505+ Map .of ("door_nr" , 12 , "area" , 26.7 )));
506+ Map <String , Object > house_2 = Map .of (
507+ "address" , new Address (
508+ "Port Mariland St." ,
509+ 111 ,
510+ false ),
511+ "apartments" , new Map [] {
512+ Map .of ("door_nr" , 21 , "area" , 42.2 ),
513+ Map .of ("door_nr" , 22 , "area" , 26.7 ),
514+ });
499515
500516 // Act
501517 var result = buildings .data .insertMany (house_1 , house_2 );
0 commit comments