You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Kevin Williams (JIRA)" <ji...@apache.org> on 2006/02/22 00:14:29 UTC
[jira] Closed: (TUSCANY-35) Using ApplyChangesCommand on DataObject
child (not root) fails silently
[ http://issues.apache.org/jira/browse/TUSCANY-35?page=all ]
Kevin Williams closed TUSCANY-35:
---------------------------------
Verified on revison 379618
> 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