[teiid-issues] [JBoss JIRA] (TEIID-5599) When creating an entity via POST message, it is expected, that the returned message includes the primary key of the newly created instance. This is not the case currently

Steven Hawkins (Jira) issues at jboss.org
Wed Jan 16 09:36:11 EST 2019


     [ https://issues.jboss.org/browse/TEIID-5599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on TEIID-5599 started by Steven Hawkins.
---------------------------------------------
> When creating an entity via POST message, it is expected, that the returned message includes the primary key of the newly created instance. This is not the case currently
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TEIID-5599
>                 URL: https://issues.jboss.org/browse/TEIID-5599
>             Project: Teiid
>          Issue Type: Bug
>            Reporter: Christoph John
>            Assignee: Steven Hawkins
>            Priority: Critical
>             Fix For: 12.1
>
>
> 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
> {"uuidUser":"65820574-7525-463b-9d20-5ee133a06b94","idProfile":"0"}
> --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
> {"@odata.context":"http://localhost/odata4/svc/my_nutri_diary/$metadata#Account","idProfile":"0","uuidUser":"65820574-7525-463b-9d20-5ee133a06b94"}
> --batch_e834eb7c-df0d-4e22-a423-78cd3638955f
> Content-Type: application/http
> Content-Transfer-Encoding: binary



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the teiid-issues mailing list