Hi,
I am profiting from this slow-down of the updates to the deployment code to refresh these two patches:
* http://jira.codehaus.org/browse/TQL-3; and
* http://jira.codehaus.org/browse/OPENEJB-13.
They enable the CMR capabilities of TranQL and complete the support of compound PK.
During the implementation of these two patches, I have found two issues, that I have deliberately left aside for this second pass (the first was CMR only without compound PK):
- ejbFind<METHOD> do not add to the InTxCache CacheRow corresponding to the instances, which have been found. This means that the following code do not work:
<start the transaction> CompoundPK pkA = new CompoundPK(new Integer(2), "value2"); ALocal a = ahome.create(pkA); BLocal b = bhome.findByPrimaryKey(new Integer(11)); a.setB(b); <commit transaction>
They do not work as no CacheRow corresponding to b is in the InTxCache. I have avoided this issue by performing a dummy load operation (e.g. b.getField1()) just after the findByPrimaryKey call. So, if you check the various TestCase, you will see some of these weird lines.
I think that ejbFind<Method> should add to the InTxCache the relevant CacheRow and also inject the identity into this CacheRow.
- an Axion bug causes various tests to fail. Basically, the following update does not work as expected:
// The following PrepareStatement does not set to null fka
// PreparedStatement ps = null;
// ps = c.prepareStatement("UPDATE B SET value = CASE WHEN ? THEN ? ELSE value END, fka = CASE WHEN ? THEN ? ELSE fka END WHERE b1 = ?");
// ps.setBoolean(1, false);
// ps.setString(2, "");
// ps.setBoolean(3, true);
// ps.setNull(4);
// ps.setInt(5, 1);
// ps.execute();
Due to this reason, some tests have been disabled. Though, they have been successfully executed with the DataSource of MySQL.
At this stage, CMP EntityBean with unknown PK are not supported. I think that this is the "last" limitation, which stops us to deploy PetStore 1.3. I will start working on that on Tuesday. Hopefully, it should be completed by the end of next week.
Thanks, Gianny
