Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/persister
In directory sc8-pr-cvs1:/tmp/cvs-serv2791/hibernate/persister
Modified Files:
EntityPersister.java
Log Message:
fixed a problem where an (incorrect) SQL UPDATE was issued when update() was called on an object with no updateable properties
Index: EntityPersister.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/persister/EntityPersister.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** EntityPersister.java 29 Mar 2003 04:08:48 -0000 1.22
--- EntityPersister.java 2 Apr 2003 13:10:36 -0000 1.23
***************
*** 81,85 ****
private final Type[] subclassPropertyTypeClosure;
private final Class[] subclassClosure;
! private final boolean hasColumns;
private final int[] joinedFetch;
--- 81,85 ----
private final Type[] subclassPropertyTypeClosure;
private final Class[] subclassClosure;
! private final boolean hasUpdateableColumns;
private final int[] joinedFetch;
***************
*** 573,577 ****
}
! if (!hasColumns) return;
final PreparedStatement statement;
--- 573,577 ----
}
! if (!hasUpdateableColumns) return;
final PreparedStatement statement;
***************
*** 682,686 ****
colNames[j] = col.getName();
j++;
! foundColumn=true;
}
propertyColumnNames[i] = colNames;
--- 682,686 ----
colNames[j] = col.getName();
j++;
! if ( prop.isUpdateable() ) foundColumn=true;
}
propertyColumnNames[i] = colNames;
***************
*** 695,699 ****
}
! hasColumns = foundColumn;
ArrayList columns = new ArrayList();
--- 695,699 ----
}
! hasUpdateableColumns = foundColumn;
ArrayList columns = new ArrayList();
|