Test code preparedstatement pst

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: WRITEABLE property named 'XXX' in class 'YYY' While checking the source code I found the following: package com.ibatis.common.beans; ... public class ComplexBeanProbe extends BaseProbe { ... /** * Returns an array of the writeable properties exposed by a bean * * @param object The bean * @return The properties */ public String getWriteablePropertyNames(Object object) { return ClassInfo.getInstance(object.getClass()).getReadablePropertyNames(); ^^^^^^^^^^^ } Looks like a copy&paste error... :) Exception is thrown by TransactionManager when multiple commits are issued against a started transaction. The following exception is thrown when issuing multiple commits against a started transaction. com.ibatis.common.jdbc.exception.NestedSQLException: Could not commit transaction. Cause: com.ibatis.sqlmap.engine.transaction.TransactionException: TransactionManager could not commit. No transaction is started. The problem is that the TransactionManager is throwing this exception in all cases except when the Transaction State is STATE_STARTED. In this scenario, the transaction has been started, but its state is STATE_COMMITTED. Clinton asked me to log this issue and attach my fix. The fix is in the TransactionManager.commit method and allows a commit to be performed if the Transaction state is either STATE_STARTED or STATE_COMMITTED. SELECT statement returns unexpected result when 'groupBy' and 'nullValue' are specified in resultMaps. [Preparation] -- Database CREATE TABLE parent ( parentId, parentName ); CREATE TABLE child ( childId, parentId, childName, childAge ); INSERT INTO parent ( parentId, parentName ) VALUES ( 1, 'Mr Parent' ); -- Java classes. public class Parent { private int parentId; private String parentName; private List childList; // accessor methods... } public class Child { private int childId; private String childName; private int childAge; // accessor methods... } --SqlMap. <sqlMap namespace="Family"> <resultMap id="parentResult" class="Parent" groupBy=&q...
View Full Document

Ask a homework question - tutors are online