Bugs item #791501, was opened at 2003-08-19 23:42 Message generated for change (Settings changed) made by loubyansky You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=791501&group_id=22866
>Category: JBossCMP Group: v3.2 Status: Open >Resolution: Accepted Priority: 5 Submitted By: Jerrold E Eads (jeeads) >Assigned to: Alexey Loubyansky (loubyansky) Summary: Optimistic locking problem with SQL Server 2000 Initial Comment: Optimistic Locking problem when using SQL Server 2000 and JBoss 3.2.1 When using SQL Server with JBoss 3.2.1 the following problem occurs. When updating an optimistically locked field that has an initial value of null the update fails. Code related: JDBCStoreCommand.java line 00108 sql.append(" WHERE").append(SQLUtil.getWhereClause (whereFields)); The where fields are the primary key field and the optimistically locked fields. String jdbc::SQLUtil::getWhereClause(List fields) [inline static] Returns columnName0=? [AND columnName1=? [AND columnName2=? [....]]] In SQL Server 2000 if a field is null the syntax has to be columnName0 is ? where ? is null The columnName=? syntax fails the update. The call on line 00108 should not be completed until the values for the lockedFields are known. This could be done in the for loop between lines 00142 and 00147. After getting the values a call to SQLUtil.getWhereClause (JDBCFieldBridge field) or SQLUtil.getIsNullClause(boolean not, JDBCFieldBridge field, String identifier) could be appended to make the SQL statement correct. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=791501&group_id=22866 ------------------------------------------------------- This SF.net email is sponsored by Dice.com. Did you know that Dice has over 25,000 tech jobs available today? From careers in IT to Engineering to Tech Sales, Dice has tech jobs from the best hiring companies. http://www.dice.com/index.epl?rel_code=104 _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development