The following communication shows the issue. What I am doing here is to create a new Account entity via post request. My underlaying mysql database requires the primary key in the table to be set to NN (not null), hence, a value must be provided. Moreover the primary key is set to autoincrement and is generated by the database. The only execepted value here seems to be, to provide the key with value=0. The object is created in the database as expected. However, Teiid answers with the created object, but again with the primary key (idProfile) set as zero, instead to provide the newly created primary key.
POST Account HTTP/1.1
Accept:application/json;odata.metadata=minimal;IEEE754Compatible=true
Accept-Language:de-DE
Content-Type:application/json;charset=UTF-8;IEEE754Compatible=true
--batch_id-1547485733072-21
Content-Type:application/http
Content-Transfer-Encoding:binary
The response:
HTTP/1.1 201 Created
Location: http://localhost/odata4/svc/my_nutri_diary/Account(0)
Content-Type: application/json;ieee754compatible=true;odata.metadata=minimal
Content-Length: 147
--batch_e834eb7c-df0d-4e22-a423-78cd3638955f
Content-Type: application/http
Content-Transfer-Encoding: binary