I have a view in which I declare a column to be a primary key, but I have set it as NULLABLE because I am generating it in the backend. I do not want the user to pass it.
id integer PRIMARY KEY /*Observe - no NOT NULL*/
I generate the value myself here and pass it in the Insert trigger:
DECLARE integer VARIABLES.id = /**generate value/
This works in JDBC.
But, this is not working with ODATA. how do I make this work in ODATA? Having a primary key , but nullable and let it know that the value will be handled in the backend?
What version are you on? [TEIID-2852] Retrieval of AUTO GENERATED Keys does not work with JDBC Translator - JBoss Issue Tracker and [TEIID-2851] ODATA POST fails if table column is of IDENTITY type (sql server) - JBoss Issue Tracker may be needed for this to work.