diff --git a/doc/modelling/types/README.md b/doc/modelling/types/README.md index 3ad62fcf6..93525e5ae 100644 --- a/doc/modelling/types/README.md +++ b/doc/modelling/types/README.md @@ -99,4 +99,27 @@ class LodataServiceProvider extends ServiceProvider Lodata::add($set); } } +``` + +## Immutable properties + +Lodata supports annotating a property as `Immutable` meaning that it can be provided as part of a create request, but +will be ignored during an update request. + +```php +class LodataServiceProvider extends ServiceProvider +{ + public function boot() + { + $entityType = new \Flat3\Lodata\EntityType('example'); + $entityType->setKey(new \Flat3\Lodata\DeclaredProperty('id', \Flat3\Lodata\Type::string())); + $entityType->addDeclaredProperty('name', \Flat3\Lodata\Type::string()); + $dob = new \Flat3\Lodata\DeclaredProperty('dob', \Flat3\Lodata\Type::date()); + $dob->addAnnotation(new \Flat3\Lodata\Annotation\Core\V1\Immutable); + $entityType->addProperty($dob); + $entitySet = new \Flat3\Lodata\Drivers\CollectionEntitySet('examples', $entityType); + $entitySet->setCollection($collection); + \Lodata::add($entitySet); + } +} ``` \ No newline at end of file diff --git a/src/ComplexType.php b/src/ComplexType.php index c0b25c48e..ad3043cad 100644 --- a/src/ComplexType.php +++ b/src/ComplexType.php @@ -286,12 +286,12 @@ public function getOpenAPIUpdateSchema(): array /** * Ensure the provided property values are valid against this type * @param PropertyValues $propertyValues Property values - * @return void + * @return PropertyValues */ - public function assertPropertyValues(PropertyValues $propertyValues): void + public function assertPropertyValues(PropertyValues $propertyValues): PropertyValues { if ($this->isOpen()) { - return; + return $propertyValues; } $properties = $this->getProperties(); @@ -310,26 +310,32 @@ public function assertPropertyValues(PropertyValues $propertyValues): void ) ); } + + return $propertyValues; } /** * Ensure the provided property values meet the update requirements of the entity type * @param PropertyValues $propertyValues Property values - * @return void + * @return PropertyValues */ - public function assertUpdateProperties(PropertyValues $propertyValues) + public function assertUpdateProperties(PropertyValues $propertyValues): PropertyValues { - $this->assertPropertyValues($propertyValues); + return $this->assertPropertyValues($propertyValues)->filter(function (PropertyValue $propertyValue) { + return !$propertyValue->getProperty()->isImmutable(); + }); } /** * Ensure the provided property values meet the create requirements of the entity type * @param PropertyValues $propertyValues Property values * @param PropertyValue|null $foreignKey Foreign key value - * @return void + * @return PropertyValues */ - public function assertCreateProperties(PropertyValues $propertyValues, ?PropertyValue $foreignKey = null) - { + public function assertCreateProperties( + PropertyValues $propertyValues, + ?PropertyValue $foreignKey = null + ): PropertyValues { $declaredProperties = $this->getDeclaredProperties(); $this->assertPropertyValues($propertyValues); @@ -364,5 +370,7 @@ public function assertCreateProperties(PropertyValues $propertyValues, ?Property $declaredProperty->assertAllowsValue(null); } + + return $propertyValues; } } diff --git a/src/Entity.php b/src/Entity.php index e0392aa65..a2abb6f4b 100644 --- a/src/Entity.php +++ b/src/Entity.php @@ -278,7 +278,7 @@ public function patch(Transaction $transaction, ?ContextInterface $context = nul $propertyValues = $entitySet->arrayToPropertyValues($entitySet->getTransaction()->getBodyAsArray()); - $this->getType()->assertUpdateProperties($propertyValues); + $propertyValues = $this->getType()->assertUpdateProperties($propertyValues); $entity = $entitySet->update($this->getEntityId(), $propertyValues); diff --git a/src/EntitySet.php b/src/EntitySet.php index 7d18a2b60..1657e4c32 100644 --- a/src/EntitySet.php +++ b/src/EntitySet.php @@ -331,7 +331,7 @@ public function response(Transaction $transaction, ?ContextInterface $context = Gate::create($this, $transaction)->ensure(); $propertyValues = $this->arrayToPropertyValues($this->getTransaction()->getBodyAsArray()); - $this->getType()->assertCreateProperties($propertyValues, $this->navigationSource); + $propertyValues = $this->getType()->assertCreateProperties($propertyValues, $this->navigationSource); $transaction->getResponse()->setStatusCode(Response::HTTP_CREATED); @@ -858,7 +858,7 @@ public function processDeltaCreate(Transaction $transaction): Entity Gate::create($this, $transaction)->ensure(); $propertyValues = $this->arrayToPropertyValues($this->transaction->getBodyAsArray()); - $this->getType()->assertCreateProperties($propertyValues, $this->navigationSource); + $propertyValues = $this->getType()->assertCreateProperties($propertyValues, $this->navigationSource); $entity = $this->create($propertyValues); $transaction->processDeltaPayloads($entity); @@ -882,7 +882,7 @@ public function processDeltaModify(Transaction $transaction, Entity $entity): En $propertyValues = $this->arrayToPropertyValues($transaction->getBodyAsArray()); - $this->getType()->assertUpdateProperties($propertyValues); + $propertyValues = $this->getType()->assertUpdateProperties($propertyValues); $entity = $this->update($entity->getEntityId(), $propertyValues); diff --git a/src/Property.php b/src/Property.php index 5c0256fd4..c99d506b1 100644 --- a/src/Property.php +++ b/src/Property.php @@ -7,6 +7,7 @@ use Flat3\Lodata\Annotation\Core\V1\Computed; use Flat3\Lodata\Annotation\Core\V1\ComputedDefaultValue; use Flat3\Lodata\Annotation\Core\V1\Description; +use Flat3\Lodata\Annotation\Core\V1\Immutable; use Flat3\Lodata\Exception\Protocol\BadRequestException; use Flat3\Lodata\Exception\Protocol\ConfigurationException; use Flat3\Lodata\Helper\Constants; @@ -411,4 +412,13 @@ public function isComputed(): bool $this->hasAnnotation(new Computed, Boolean::true()) || $this->hasAnnotation(new ComputedDefaultValue, Boolean::true()); } + + /** + * Determine whether this property is immutable + * @return bool + */ + public function isImmutable(): bool + { + return $this->hasAnnotation(new Immutable); + } } diff --git a/tests/EntitySetCreate/EntitySetCreate.php b/tests/EntitySetCreate/EntitySetCreate.php index f7d254175..a2bfaa0e8 100644 --- a/tests/EntitySetCreate/EntitySetCreate.php +++ b/tests/EntitySetCreate/EntitySetCreate.php @@ -4,6 +4,7 @@ namespace Flat3\Lodata\Tests\EntitySetCreate; +use Flat3\Lodata\Annotation\Core\V1\Immutable; use Flat3\Lodata\Controller\Response; use Flat3\Lodata\Facades\Lodata; use Flat3\Lodata\Tests\Helpers\Request; @@ -190,4 +191,21 @@ public function test_collection_property() Response::HTTP_CREATED ); } + + public function test_creates_with_immutable() + { + $type = Lodata::getEntitySet($this->entitySet)->getType(); + $type->getProperty('age')->addAnnotation(new Immutable); + + $this->assertJsonResponseSnapshot( + (new Request) + ->post() + ->path($this->entitySetPath) + ->body([ + 'name' => 'Four', + 'age' => 4, + ]), + Response::HTTP_CREATED + ); + } } diff --git a/tests/EntitySetCreate/FilesystemTest.php b/tests/EntitySetCreate/FilesystemTest.php index 22387d5f3..15cbd2b31 100644 --- a/tests/EntitySetCreate/FilesystemTest.php +++ b/tests/EntitySetCreate/FilesystemTest.php @@ -126,4 +126,9 @@ public function test_collection_property() { $this->expectNotToPerformAssertions(); } + + public function test_creates_with_immutable() + { + $this->expectNotToPerformAssertions(); + } } diff --git a/tests/EntitySetCreate/KeyedCollectionTest.php b/tests/EntitySetCreate/KeyedCollectionTest.php index 70ce84b22..78efc1fc4 100644 --- a/tests/EntitySetCreate/KeyedCollectionTest.php +++ b/tests/EntitySetCreate/KeyedCollectionTest.php @@ -4,7 +4,9 @@ namespace Flat3\Lodata\Tests\EntitySetCreate; +use Flat3\Lodata\Annotation\Core\V1\Immutable; use Flat3\Lodata\Controller\Response; +use Flat3\Lodata\Facades\Lodata; use Flat3\Lodata\Tests\Drivers\WithKeyedCollectionDriver; use Flat3\Lodata\Tests\Helpers\Request; @@ -129,4 +131,22 @@ public function test_create_accepts_invalid_property() Response::HTTP_CREATED ); } + + public function test_creates_with_immutable() + { + $type = Lodata::getEntitySet($this->entitySet)->getType(); + $type->getProperty('age')->addAnnotation(new Immutable); + + $this->assertJsonResponseSnapshot( + (new Request) + ->post() + ->path($this->entitySetPath) + ->body([ + 'id' => 'zeta', + 'name' => 'Four', + 'age' => 4, + ]), + Response::HTTP_CREATED + ); + } } diff --git a/tests/EntitySetCreate/RedisTest.php b/tests/EntitySetCreate/RedisTest.php index afe93e292..1654286c6 100644 --- a/tests/EntitySetCreate/RedisTest.php +++ b/tests/EntitySetCreate/RedisTest.php @@ -4,6 +4,7 @@ namespace Flat3\Lodata\Tests\EntitySetCreate; +use Flat3\Lodata\Annotation\Core\V1\Immutable; use Flat3\Lodata\Controller\Response; use Flat3\Lodata\Facades\Lodata; use Flat3\Lodata\Tests\Drivers\WithRedisDriver; @@ -150,4 +151,22 @@ public function test_create_accepts_invalid_property() Response::HTTP_CREATED ); } + + public function test_creates_with_immutable() + { + $type = Lodata::getEntitySet($this->entitySet)->getType(); + $type->getProperty('age')->addAnnotation(new Immutable); + + $this->assertJsonResponseSnapshot( + (new Request) + ->post() + ->path($this->entitySetPath) + ->body([ + 'key' => 'zeta', + 'name' => 'Four', + 'age' => 4, + ]), + Response::HTTP_CREATED + ); + } } diff --git a/tests/EntityUpdate/EntityUpdate.php b/tests/EntityUpdate/EntityUpdate.php index 331c4847d..b96814356 100644 --- a/tests/EntityUpdate/EntityUpdate.php +++ b/tests/EntityUpdate/EntityUpdate.php @@ -4,6 +4,7 @@ namespace Flat3\Lodata\Tests\EntityUpdate; +use Flat3\Lodata\Annotation\Core\V1\Immutable; use Flat3\Lodata\Controller\Response; use Flat3\Lodata\Facades\Lodata; use Flat3\Lodata\Tests\Helpers\Request; @@ -394,4 +395,19 @@ public function test_collection_property_delete() ->path($this->entityPath.'/emails'), ); } + + public function test_ignores_immutable() + { + $type = Lodata::getEntitySet($this->entitySet)->getType(); + $type->getProperty('name')->addAnnotation(new Immutable); + + $this->assertJsonResponseSnapshot( + (new Request) + ->path($this->entityPath) + ->patch() + ->body([ + 'name' => 'Alph', + ]) + ); + } } diff --git a/tests/__snapshots__/EntitySetCreate/EloquentTest__test_creates_with_immutable__1.json b/tests/__snapshots__/EntitySetCreate/EloquentTest__test_creates_with_immutable__1.json new file mode 100644 index 000000000..eefb504a5 --- /dev/null +++ b/tests/__snapshots__/EntitySetCreate/EloquentTest__test_creates_with_immutable__1.json @@ -0,0 +1,15 @@ +{ + "@context": "http://localhost/odata/$metadata#Passengers/$entity", + "id": 6, + "flight_id": null, + "name": "Four", + "dob": null, + "age": 4, + "chips": null, + "dq": null, + "in_role": null, + "open_time": null, + "colour": null, + "sock_colours": null, + "emails": [] +} diff --git a/tests/__snapshots__/EntitySetCreate/EloquentTest__test_creates_with_immutable__2.txt b/tests/__snapshots__/EntitySetCreate/EloquentTest__test_creates_with_immutable__2.txt new file mode 100644 index 000000000..1d96d45b2 --- /dev/null +++ b/tests/__snapshots__/EntitySetCreate/EloquentTest__test_creates_with_immutable__2.txt @@ -0,0 +1,21 @@ +@@ @@ + "colour": null, + "sock_colours": null, + "emails": null ++ }, ++ { ++ "id": 6, ++ "flight_id": null, ++ "name": "Four", ++ "dob": null, ++ "age": 4, ++ "chips": null, ++ "dq": null, ++ "in_role": null, ++ "open_time": null, ++ "colour": null, ++ "sock_colours": null, ++ "emails": null + } + ], + "pets": [ diff --git a/tests/__snapshots__/EntitySetCreate/KeyedCollectionTest__test_creates_with_immutable__1.json b/tests/__snapshots__/EntitySetCreate/KeyedCollectionTest__test_creates_with_immutable__1.json new file mode 100644 index 000000000..180b98f0b --- /dev/null +++ b/tests/__snapshots__/EntitySetCreate/KeyedCollectionTest__test_creates_with_immutable__1.json @@ -0,0 +1,15 @@ +{ + "@context": "http://localhost/odata/$metadata#passengers/$entity", + "id": "zeta", + "name": "Four", + "age": 4, + "dob": null, + "chips": null, + "dq": null, + "in_role": null, + "open_time": null, + "flight_id": null, + "colour": null, + "sock_colours": null, + "emails": [] +} diff --git a/tests/__snapshots__/EntitySetCreate/KeyedCollectionTest__test_creates_with_immutable__2.txt b/tests/__snapshots__/EntitySetCreate/KeyedCollectionTest__test_creates_with_immutable__2.txt new file mode 100644 index 000000000..ffa25f804 --- /dev/null +++ b/tests/__snapshots__/EntitySetCreate/KeyedCollectionTest__test_creates_with_immutable__2.txt @@ -0,0 +1,11 @@ +@@ @@ + "in_role": 888.9, + "colour": null, + "sock_colours": null ++ }, ++ "zeta": { ++ "id": "zeta", ++ "name": "Four", ++ "age": 4 + } + } diff --git a/tests/__snapshots__/EntitySetCreate/MongoTest__test_creates_with_immutable__1.json b/tests/__snapshots__/EntitySetCreate/MongoTest__test_creates_with_immutable__1.json new file mode 100644 index 000000000..4666e5097 --- /dev/null +++ b/tests/__snapshots__/EntitySetCreate/MongoTest__test_creates_with_immutable__1.json @@ -0,0 +1,15 @@ +{ + "@context": "http://localhost/odata/$metadata#passengers/$entity", + "name": "Four", + "age": 4, + "_id": "four", + "dob": null, + "chips": null, + "dq": null, + "in_role": null, + "open_time": null, + "flight_id": null, + "colour": null, + "sock_colours": null, + "emails": [] +} diff --git a/tests/__snapshots__/EntitySetCreate/MongoTest__test_creates_with_immutable__2.txt b/tests/__snapshots__/EntitySetCreate/MongoTest__test_creates_with_immutable__2.txt new file mode 100644 index 000000000..6b47402f0 --- /dev/null +++ b/tests/__snapshots__/EntitySetCreate/MongoTest__test_creates_with_immutable__2.txt @@ -0,0 +1,11 @@ +@@ @@ + "in_role": 888.9, + "colour": 0, + "sock_colours": 0 ++ }, ++ { ++ "_id": "four", ++ "name": "Four", ++ "age": 4 + } + ] diff --git a/tests/__snapshots__/EntitySetCreate/NumericCollectionTest__test_creates_with_immutable__1.json b/tests/__snapshots__/EntitySetCreate/NumericCollectionTest__test_creates_with_immutable__1.json new file mode 100644 index 000000000..5d59e0dcc --- /dev/null +++ b/tests/__snapshots__/EntitySetCreate/NumericCollectionTest__test_creates_with_immutable__1.json @@ -0,0 +1,15 @@ +{ + "@context": "http://localhost/odata/$metadata#passengers/$entity", + "name": "Four", + "age": 4, + "id": 5, + "dob": null, + "chips": null, + "dq": null, + "in_role": null, + "open_time": null, + "flight_id": null, + "colour": null, + "sock_colours": null, + "emails": [] +} diff --git a/tests/__snapshots__/EntitySetCreate/NumericCollectionTest__test_creates_with_immutable__2.txt b/tests/__snapshots__/EntitySetCreate/NumericCollectionTest__test_creates_with_immutable__2.txt new file mode 100644 index 000000000..597022fa1 --- /dev/null +++ b/tests/__snapshots__/EntitySetCreate/NumericCollectionTest__test_creates_with_immutable__2.txt @@ -0,0 +1,10 @@ +@@ @@ + "in_role": 888.9, + "colour": null, + "sock_colours": null ++ }, ++ { ++ "name": "Four", ++ "age": 4 + } + ] diff --git a/tests/__snapshots__/EntitySetCreate/RedisTest__test_creates_with_immutable__1.json b/tests/__snapshots__/EntitySetCreate/RedisTest__test_creates_with_immutable__1.json new file mode 100644 index 000000000..2465f76fa --- /dev/null +++ b/tests/__snapshots__/EntitySetCreate/RedisTest__test_creates_with_immutable__1.json @@ -0,0 +1,15 @@ +{ + "@context": "http://localhost/odata/$metadata#passengers/$entity", + "key": "zeta", + "name": "Four", + "age": 4, + "dob": null, + "chips": null, + "dq": null, + "in_role": null, + "open_time": null, + "flight_id": null, + "colour": null, + "sock_colours": null, + "emails": [] +} diff --git a/tests/__snapshots__/EntitySetCreate/RedisTest__test_creates_with_immutable__2.txt b/tests/__snapshots__/EntitySetCreate/RedisTest__test_creates_with_immutable__2.txt new file mode 100644 index 000000000..5f6a5c987 --- /dev/null +++ b/tests/__snapshots__/EntitySetCreate/RedisTest__test_creates_with_immutable__2.txt @@ -0,0 +1,10 @@ +@@ @@ + "in_role": 888.9, + "colour": null, + "sock_colours": null ++ }, ++ "zeta": { ++ "name": "Four", ++ "age": 4 + } + } diff --git a/tests/__snapshots__/EntitySetCreate/SQLTest__test_creates_with_immutable__1.json b/tests/__snapshots__/EntitySetCreate/SQLTest__test_creates_with_immutable__1.json new file mode 100644 index 000000000..75ccae2fe --- /dev/null +++ b/tests/__snapshots__/EntitySetCreate/SQLTest__test_creates_with_immutable__1.json @@ -0,0 +1,15 @@ +{ + "@context": "http://localhost/odata/$metadata#passengers/$entity", + "id": 6, + "name": "Four", + "age": 4, + "dob": null, + "chips": null, + "dq": null, + "in_role": null, + "open_time": null, + "flight_id": null, + "colour": null, + "sock_colours": null, + "emails": [] +} diff --git a/tests/__snapshots__/EntitySetCreate/SQLTest__test_creates_with_immutable__2.txt b/tests/__snapshots__/EntitySetCreate/SQLTest__test_creates_with_immutable__2.txt new file mode 100644 index 000000000..1d96d45b2 --- /dev/null +++ b/tests/__snapshots__/EntitySetCreate/SQLTest__test_creates_with_immutable__2.txt @@ -0,0 +1,21 @@ +@@ @@ + "colour": null, + "sock_colours": null, + "emails": null ++ }, ++ { ++ "id": 6, ++ "flight_id": null, ++ "name": "Four", ++ "dob": null, ++ "age": 4, ++ "chips": null, ++ "dq": null, ++ "in_role": null, ++ "open_time": null, ++ "colour": null, ++ "sock_colours": null, ++ "emails": null + } + ], + "pets": [ diff --git a/tests/__snapshots__/EntityUpdate/EloquentTest__test_ignores_immutable__1.json b/tests/__snapshots__/EntityUpdate/EloquentTest__test_ignores_immutable__1.json new file mode 100644 index 000000000..245dfed27 --- /dev/null +++ b/tests/__snapshots__/EntityUpdate/EloquentTest__test_ignores_immutable__1.json @@ -0,0 +1,18 @@ +{ + "@context": "http://localhost/odata/$metadata#Passengers/$entity", + "id": 1, + "flight_id": 1, + "name": "Alpha", + "dob": "2000-01-01T04:04:04+00:00", + "age": 4, + "chips": true, + "dq": "2000-01-01", + "in_role": "P1DT0S", + "open_time": "05:05:05.000000", + "colour": "Green", + "sock_colours": "Green,Blue", + "emails": [ + "alpha@example.com", + "alpha@beta.com" + ] +} diff --git a/tests/__snapshots__/EntityUpdate/KeyedCollectionTest__test_ignores_immutable__1.json b/tests/__snapshots__/EntityUpdate/KeyedCollectionTest__test_ignores_immutable__1.json new file mode 100644 index 000000000..f00f51c18 --- /dev/null +++ b/tests/__snapshots__/EntityUpdate/KeyedCollectionTest__test_ignores_immutable__1.json @@ -0,0 +1,18 @@ +{ + "@context": "http://localhost/odata/$metadata#passengers/$entity", + "id": "alpha", + "name": "Alpha", + "age": 4, + "dob": "2000-01-01T04:04:04+00:00", + "chips": true, + "dq": "2000-01-01", + "in_role": "P1DT0S", + "open_time": "05:05:05.000000", + "flight_id": 1, + "colour": "Green", + "sock_colours": "Green,Blue", + "emails": [ + "alpha@example.com", + "alpha@beta.com" + ] +} diff --git a/tests/__snapshots__/EntityUpdate/MongoTest__test_ignores_immutable__1.json b/tests/__snapshots__/EntityUpdate/MongoTest__test_ignores_immutable__1.json new file mode 100644 index 000000000..bb8fbf5a9 --- /dev/null +++ b/tests/__snapshots__/EntityUpdate/MongoTest__test_ignores_immutable__1.json @@ -0,0 +1,18 @@ +{ + "@context": "http://localhost/odata/$metadata#passengers/$entity", + "_id": "alpha", + "name": "Alpha", + "age": 4, + "dob": "2000-01-01T04:04:04+00:00", + "chips": true, + "dq": "2000-01-01", + "in_role": "P1DT0S", + "open_time": "05:05:05.000000", + "flight_id": 1, + "colour": "Green", + "sock_colours": "Green,Blue", + "emails": [ + "alpha@example.com", + "alpha@beta.com" + ] +} diff --git a/tests/__snapshots__/EntityUpdate/NumericCollectionTest__test_ignores_immutable__1.json b/tests/__snapshots__/EntityUpdate/NumericCollectionTest__test_ignores_immutable__1.json new file mode 100644 index 000000000..8cfcc770b --- /dev/null +++ b/tests/__snapshots__/EntityUpdate/NumericCollectionTest__test_ignores_immutable__1.json @@ -0,0 +1,18 @@ +{ + "@context": "http://localhost/odata/$metadata#passengers/$entity", + "id": 0, + "name": "Alpha", + "age": 4, + "dob": "2000-01-01T04:04:04+00:00", + "chips": true, + "dq": "2000-01-01", + "in_role": "P1DT0S", + "open_time": "05:05:05.000000", + "flight_id": 1, + "colour": "Green", + "sock_colours": "Green,Blue", + "emails": [ + "alpha@example.com", + "alpha@beta.com" + ] +} diff --git a/tests/__snapshots__/EntityUpdate/RedisTest__test_ignores_immutable__1.json b/tests/__snapshots__/EntityUpdate/RedisTest__test_ignores_immutable__1.json new file mode 100644 index 000000000..86d5fdc83 --- /dev/null +++ b/tests/__snapshots__/EntityUpdate/RedisTest__test_ignores_immutable__1.json @@ -0,0 +1,18 @@ +{ + "@context": "http://localhost/odata/$metadata#passengers/$entity", + "name": "Alpha", + "age": 4, + "dob": "2000-01-01T04:04:04+00:00", + "chips": true, + "dq": "2000-01-01", + "in_role": "P1DT0S", + "open_time": "05:05:05.000000", + "flight_id": 1, + "colour": "Green", + "sock_colours": "Green,Blue", + "emails": [ + "alpha@example.com", + "alpha@beta.com" + ], + "key": "alpha" +} diff --git a/tests/__snapshots__/EntityUpdate/SQLTest__test_ignores_immutable__1.json b/tests/__snapshots__/EntityUpdate/SQLTest__test_ignores_immutable__1.json new file mode 100644 index 000000000..b75bf1e83 --- /dev/null +++ b/tests/__snapshots__/EntityUpdate/SQLTest__test_ignores_immutable__1.json @@ -0,0 +1,18 @@ +{ + "@context": "http://localhost/odata/$metadata#passengers/$entity", + "id": 1, + "name": "Alpha", + "age": 4, + "dob": "2000-01-01T04:04:04+00:00", + "chips": true, + "dq": "2000-01-01", + "in_role": "P1DT0S", + "open_time": "05:05:05.000000", + "flight_id": 1, + "colour": "Green", + "sock_colours": "Green,Blue", + "emails": [ + "alpha@example.com", + "alpha@beta.com" + ] +}