[ http://issues.apache.org/jira/browse/TUSCANY-35?page=all ]

Kevin Williams reassigned TUSCANY-35:
-------------------------------------

    Assign To: Kevin Williams

Duplicated with failing test case in DefectTests.testTuscany35()

> Using ApplyChangesCommand on DataObject child (not root) fails silently
> -----------------------------------------------------------------------
>
>          Key: TUSCANY-35
>          URL: http://issues.apache.org/jira/browse/TUSCANY-35
>      Project: Tuscany
>         Type: Bug
>   Components: Java DAS RDB
>     Reporter: Philip K. Warren
>     Assignee: Kevin Williams
>     Priority: Minor

>
> When testing DAS, I initially tried to make a change to a child DataObject of 
> the root returned from a DAS command. Here is some sample code (substitute 
> appropriate DB table/column names):
> Connection c = ...;
> c.setAutoCommit(false);
> cmd = Command.FACTORY.createCommand("SELECT * FROM TABLE WHERE 
> COLUMN=:COLUMN");
> cmd.setParameterValue("COLUMN", "val");
> cmd.setConnection(c);
> DataObject root = cmd.executeQuery();
> DataObject childRow = root.getDataObject("TABLE[1]");
> managedServerRow.setInt("INTCOLUMN", managedServerRow.getInt("INTCOLUMN")+1);
> changeCmd = Command.FACTORY.createApplyChangesCommand();
> changeCmd.addPrimaryKey("...");
> changeCmd.setConnection(c);
> // This fails silently - must operate on root DataObject
> changeCmd.execute(childRow);
> If you examine the database after executing the ApplyChangesCommand, you will 
> see that the updates were not saved to the DB (and there was no 
> Exception/error from executing the command to know that it failed). 
> ApplyChangesCommand only seems to work from the root DataObject.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to