[
https://issues.jboss.org/browse/TEIID-5782?page=com.atlassian.jira.plugin...
]
Christoph John edited comment on TEIID-5782 at 6/24/19 10:49 PM:
-----------------------------------------------------------------
Hello Steven
I just had a quick try. I deleted the dummy key value for an insert on a table without
custom trigger and got the following error
{"error":{"code":null,"message":"OData Library: An
exception without message text was thrown."}}
I also tried on the second example which I mentioned. The one with the compound primary
key where I could not set the key group explicitly. There I now also got an error when
trying to insert a new record
Log-dbg.js:414 2019-06-24 21:17:21.677909 POST on 'UserDefinedProducts' failed;
will be repeated automatically - Error: TEIID16016 Insert into UserDefinedProducts
success, but failed to retrieve auto generated keys from source, thus failed to show
result entity; Supply the key values.
I am sorry, that I cannot look now deeper into it. Friends are waiting at the bar :) I
will be back next week and then will assemble a compose file for you to show the
situation. Maybe that way we will find the issue.
was (Author: cjohn001):
Hello Steven
I just had a quick try. I deleted the dummy key value for an insert on a table without
custom trigger and got the following error
{"error":{"code":null,"message":"OData Library: An
exception without message text was thrown."}}
I also tried on the second example which I should you with a custom insert trigger. The
one with the compound primary key where I could not set the key group explicitely. There I
now also got an error when trying to insert
Log-dbg.js:414 2019-06-24 21:17:21.677909 POST on 'UserDefinedProducts' failed;
will be repeated automatically - Error: TEIID16016 Insert into UserDefinedProducts
success, but failed to retrieve auto generated keys from source, thus failed to show
result entity; Supply the key values.
I am sorry, that I cannot look now deeper into it. Friends are waiting at the bar :) I
will be back next week and then will assemble a compose file for you to show the
situation. Maybe that way we will find the issue.
When overwriting an Insert trigger with custom logic in a ddl file,
the primary key is not correctly transferred back in the response of the odata layer with
a dummy insert value
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: TEIID-5782
URL:
https://issues.jboss.org/browse/TEIID-5782
Project: Teiid
Issue Type: Quality Risk
Components: OData
Affects Versions: 12.3
Reporter: Christoph John
Assignee: Steven Hawkins
Priority: Major
Hello,
in the past we had an issue in the odata layer, that the generated primary key of an
autoincrement key was not corretly transfered back in the odata response. This issue was
fixed.
However, the current issues derives from the discussion in
https://issues.jboss.org/browse/TEIID-5763
where we havewritten an INSTEAD OF INSERT trigger. According to my last comment to
https://issues.jboss.org/browse/TEIID-5763, there are two situations which can arrise. I
have to set the 1. key group explicitely or 2. it is set implicitely.
Now in both situations I observe the same result. When I POST an INSERT with a dummy
primary key, say key=0 (as it was NOT NULL in the past, and I am still using the old
sources) I retrieve key=0 in the odata response. Correct would be to get a response with
the generated key instead.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)