Skip to Content
1
Sep 11, 2019 at 12:54 PM

Deep Upsert / update with NodeJS cds 3.16.3

505 Views

I'm trying to do a deep upsert using CDS 3.16.3 on an Entity A with a one-to-one relationship to another Entity B.

I've tried many different calls using Postman, but all without success.

After reading changelogs, patch notes and documentation, I've come to believe that the following should work and create a new Entity of type B directly linked to A, or update an existing entity of type B linked to A.

PATCH /EntityA(id)

Body:

{
"field": "value", "navigationPropertyToB": {
"field_b": "another-value"
}
}

The server returns http 500 error and the log displays:

"invalid column name: FIELD_B_VAL".

Using OData-Version: 4.01 as an additional header does not make a difference.