From: <one...@us...> - 2002-11-05 11:48:12
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/test In directory usw-pr-cvs1:/tmp/cvs-serv20016/hibernate/test Modified Files: CustomPersister.java Nameable.hbm.xml Log Message: for normalized table mappings, only update the tables that have dirty properties Index: CustomPersister.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/CustomPersister.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** CustomPersister.java 25 Oct 2002 18:26:11 -0000 1.13 --- CustomPersister.java 5 Nov 2002 11:48:08 -0000 1.14 *************** *** 167,171 **** * @see cirrus.hibernate.persister.ClassPersister#isDirty(Object[], Object[], Object, SessionImplementor) */ ! public boolean isDirty( Object[] x, Object[] y, --- 167,171 ---- * @see cirrus.hibernate.persister.ClassPersister#isDirty(Object[], Object[], Object, SessionImplementor) */ ! public int[] findDirty( Object[] x, Object[] y, *************** *** 173,177 **** SessionImplementor session) throws HibernateException { ! return x[0]!=y[0] && ( x[0]==null || y[0]==null || !x[0].equals(y[0]) ); } --- 173,182 ---- SessionImplementor session) throws HibernateException { ! if ( x[0]!=y[0] && ( x[0]==null || y[0]==null || !x[0].equals(y[0]) ) ) { ! return new int[] { 0 }; ! } ! else { ! return null; ! } } *************** *** 330,333 **** --- 335,339 ---- Serializable id, Object[] fields, + int[] dirtyFields, Object oldVersion, Object object, Index: Nameable.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/Nameable.hbm.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Nameable.hbm.xml 5 Nov 2002 07:09:14 -0000 1.2 --- Nameable.hbm.xml 5 Nov 2002 11:48:08 -0000 1.3 *************** *** 4,8 **** <class name="cirrus.hibernate.test.Nameable"> ! <id name="key_"> <generator class="native"/> </id> --- 4,8 ---- <class name="cirrus.hibernate.test.Nameable"> ! <id name="key" column="key_"> <generator class="native"/> </id> |