DAS generates invalid INSERT statement when no properties are set on the new DO
-------------------------------------------------------------------------------
Key: TUSCANY-957
URL: http://issues.apache.org/jira/browse/TUSCANY-957
Project: Tuscany
Issue Type: Bug
Components: Java DAS RDB
Affects Versions: Java-Mx
Reporter: Kevin Williams
Fix For: Java-Mx
If a new DO is created but no properties are set then the DAS generates an
invalid INSERT statement that looks something like this:
"insert into COMPANY( values ("
The following test case (added to
/das/src/test/java/org/apache/tuscany/das/rdb/test/GeneratedId.java)
illustrates this bug:
/**
* Test insert into row with generated ID and no attributes set
*/
public void testInsert5() throws Exception {
DAS das = DAS.FACTORY.createDAS(getConfig("CompanyConfig.xml"),
getConnection());
Command select = das.getCommand("all companies");
DataObject root = select.executeQuery();
root.createDataObject("COMPANY");
das.applyChanges(root);
// Verify insert
root = select.executeQuery();
assertEquals(4, root.getList("COMPANY").size());
}
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]