[teiid-issues] [JBoss JIRA] (TEIID-2781) Unable to update database table with composite keys using OData

Steven Hawkins (JIRA) issues at jboss.org
Thu Dec 19 12:26:33 EST 2013


    [ https://issues.jboss.org/browse/TEIID-2781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932694#comment-12932694 ] 

Steven Hawkins commented on TEIID-2781:
---------------------------------------

I think there is an issue with the ODataSQLBuilder.buildEntityKeyCriteria logic then at least for the purposes of delete.  The logic assumes that a single value means to use the first column of the primary key, but if odata4j does not validate the key (as it appears to do with delete) then that is not a valid assumption.  Are there in cases where it's valid for the buildEntityKeyCriteria to lookup based upon a partial key?
                
> Unable to update database table with composite keys using OData
> ---------------------------------------------------------------
>
>                 Key: TEIID-2781
>                 URL: https://issues.jboss.org/browse/TEIID-2781
>             Project: Teiid
>          Issue Type: Bug
>          Components: SOAP Services
>    Affects Versions: 8.4.1
>            Reporter: Van Halbert
>            Assignee: Steven Hawkins
>         Attachments: odataerror.txt, post-screen-shot.png, Shell00990083.tar
>
>
> Using Postgres db, and created a table with composite keys.
> CREATE TABLE composite_key
> (
> ou_id character varying(3) NOT NULL,
> product_name character varying(15) NOT NULL,
> product_price numeric(10,2),
> CONSTRAINT composite_key_pkey PRIMARY KEY (ou_id, product_name)
> )
> WITH (
> OIDS=FALSE
> );
> ALTER TABLE composite_key OWNER TO postgres;
> INSERT INTO composite_key VALUES ('1','1',1);
> INSERT INTO composite_key VALUES ('1','2',1.20);
> INSERT INTO composite_key VALUES ('2','1',2.10);
> Deploy the VDB and use SOAP UI to do PUT (aka SQL UPDATE) generates attached odataerror.txt

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the teiid-issues mailing list