Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/test
In directory usw-pr-cvs1:/tmp/cvs-serv30487/cirrus/hibernate/test
Modified Files:
Tag: dynamic_update
CustomPersister.java
Log Message:
dynamically generated update and insert SQL to:
* update only columns that changed
* insert only non-null values
Index: CustomPersister.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/CustomPersister.java,v
retrieving revision 1.13
retrieving revision 1.13.2.1
diff -C2 -d -r1.13 -r1.13.2.1
*** CustomPersister.java 25 Oct 2002 18:26:11 -0000 1.13
--- CustomPersister.java 31 Oct 2002 08:36:19 -0000 1.13.2.1
***************
*** 170,177 ****
Object[] x,
Object[] y,
Object owner,
SessionImplementor session)
throws HibernateException {
! return x[0]!=y[0] && ( x[0]==null || y[0]==null || !x[0].equals(y[0]) );
}
--- 170,181 ----
Object[] x,
Object[] y,
+ boolean[] dirty,
Object owner,
SessionImplementor session)
throws HibernateException {
!
! boolean rslt = x[0]!=y[0] && ( x[0]==null || y[0]==null || !x[0].equals(y[0]) );
! dirty[0] = rslt;
! return rslt;
}
***************
*** 330,333 ****
--- 334,338 ----
Serializable id,
Object[] fields,
+ boolean[] dirty,
Object oldVersion,
Object object,
|