Index: cpa/src/main/java/org/exolab/castor/jdo/engine/SQLEngine.java =================================================================== --- cpa/src/main/java/org/exolab/castor/jdo/engine/SQLEngine.java (revision 8354) +++ cpa/src/main/java/org/exolab/castor/jdo/engine/SQLEngine.java (working copy) @@ -363,6 +363,10 @@ public void load(final Object conn, final ProposedEntity entity, final Identity identity, final AccessMode accessMode) throws PersistenceException { + if (identity.size() != _ids.length) { + throw new PersistenceException("Size of identity field mismatched!"); + } + _loadStatement.executeStatement((Connection) conn, identity, entity, accessMode); } Index: cpa/src/main/java/org/exolab/castor/jdo/engine/SQLStatementLoad.java =================================================================== --- cpa/src/main/java/org/exolab/castor/jdo/engine/SQLStatementLoad.java (revision 8352) +++ cpa/src/main/java/org/exolab/castor/jdo/engine/SQLStatementLoad.java (working copy) @@ -300,12 +300,6 @@ int fieldIndex = 1; // bind the identity of the preparedStatement - if (identity.size() != ids.length) { - throw new PersistenceException( - "Size of identity field mismatched! expected: " + ids.length - + " found: " + identity.size()); - } - for (int i = 0; i < ids.length; i++) { stmt.setObject(fieldIndex++, ids[i].toSQL(identity.get(i))); } Index: src/doc/release-notes.xml =================================================================== --- src/doc/release-notes.xml (revision 8434) +++ src/doc/release-notes.xml (working copy) @@ -91,6 +91,26 @@ ]]> + + + Shift identity check from SQLStatementLoad to SQLEngine. + + + Ahmad Hassan + ahmad.hassan@gmail.com + + + Ralf Joachim + ralf.joachim@syscon.eu + + + Ahmad Hassan + ahmad.hassan@gmail.com + + Bug + JDO + 20090909 + Remove remaining artefacts of old castor persistence test framework after