From: <one...@us...> - 2003-01-01 15:04:13
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/impl In directory sc8-pr-cvs1:/tmp/cvs-serv10736/hibernate/impl Modified Files: CollectionPersister.java Log Message: fixed a problem where index columns of one-to-many were not getting cleaned up Index: CollectionPersister.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/impl/CollectionPersister.java,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** CollectionPersister.java 26 Nov 2002 08:37:25 -0000 1.86 --- CollectionPersister.java 1 Jan 2003 15:04:09 -0000 1.87 *************** *** 370,381 **** private String sqlDeleteString() { if (isOneToMany) { ! return new StringBuffer("update ") .append(qualifiedTableName) .append( " set " ) .append( StringHelper.join( " = null, ", keyColumnNames ) ) ! .append( " = null where " ) .append( StringHelper.join( " = ? and ", keyColumnNames ) ) ! .append( " = ?" ) ! .toString(); } else { --- 370,387 ---- private String sqlDeleteString() { if (isOneToMany) { ! StringBuffer buf = new StringBuffer("update ") .append(qualifiedTableName) .append( " set " ) .append( StringHelper.join( " = null, ", keyColumnNames ) ) ! .append( " = null" ); ! if ( hasIndex ) { ! buf.append(", ") ! .append( StringHelper.join( " = null, ", indexColumnNames ) ) ! .append( " = null" ); ! } ! buf.append( " where " ) .append( StringHelper.join( " = ? and ", keyColumnNames ) ) ! .append( " = ?" ); ! return buf.toString(); } else { |