You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(22) |
Nov
(308) |
Dec
(131) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(369) |
Feb
(171) |
Mar
(236) |
Apr
(187) |
May
(218) |
Jun
(217) |
Jul
(127) |
Aug
(448) |
Sep
(270) |
Oct
(231) |
Nov
(422) |
Dec
(255) |
2004 |
Jan
(111) |
Feb
(73) |
Mar
(338) |
Apr
(351) |
May
(349) |
Jun
(495) |
Jul
(394) |
Aug
(1048) |
Sep
(499) |
Oct
(142) |
Nov
(269) |
Dec
(638) |
2005 |
Jan
(825) |
Feb
(1272) |
Mar
(593) |
Apr
(690) |
May
(950) |
Jun
(958) |
Jul
(767) |
Aug
(839) |
Sep
(525) |
Oct
(449) |
Nov
(585) |
Dec
(455) |
2006 |
Jan
(603) |
Feb
(656) |
Mar
(195) |
Apr
(114) |
May
(136) |
Jun
(100) |
Jul
(128) |
Aug
(68) |
Sep
(7) |
Oct
(1) |
Nov
(1) |
Dec
(8) |
2007 |
Jan
(4) |
Feb
(3) |
Mar
(8) |
Apr
(16) |
May
(5) |
Jun
(4) |
Jul
(6) |
Aug
(23) |
Sep
(15) |
Oct
(5) |
Nov
(7) |
Dec
(5) |
2008 |
Jan
(5) |
Feb
(1) |
Mar
(1) |
Apr
(5) |
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(2) |
2013 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <one...@us...> - 2002-12-25 01:02:20
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/engine In directory sc8-pr-cvs1:/tmp/cvs-serv25620/hibernate/engine Modified Files: Key.java Log Message: fixed a bug caching null one-to-one associations Index: Key.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/engine/Key.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Key.java 26 Nov 2002 03:35:41 -0000 1.3 --- Key.java 25 Dec 2002 01:02:16 -0000 1.4 *************** *** 4,7 **** --- 4,8 ---- import java.io.Serializable; + import cirrus.hibernate.AssertionFailure; import cirrus.hibernate.impl.CollectionPersister; import cirrus.hibernate.persister.ClassPersister; *************** *** 16,19 **** --- 17,21 ---- private Key(Serializable id, Serializable identifierSpace) { + if (id==null) throw new AssertionFailure("null identifier"); this.id=id; this.identifierSpace = identifierSpace; |
From: <one...@us...> - 2002-12-24 13:49:46
|
Update of /cvsroot/hibernate/Hibernate/doc/reference/src In directory sc8-pr-cvs1:/tmp/cvs-serv10168 Modified Files: manipulating_data.xml Log Message: fixed inconsistency with Javadocs Index: manipulating_data.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate/doc/reference/src/manipulating_data.xml,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** manipulating_data.xml 24 Nov 2002 10:55:26 -0000 1.28 --- manipulating_data.xml 24 Dec 2002 13:49:41 -0000 1.29 *************** *** 905,909 **** The <literal>Interceptor</literal> interface provides callbacks from the session to the application allowing the application to inspect and / or manipulate properties of a ! persistent object before it is saved, updated or deleted and after it is loaded. One possible use for this is to track auditing information. For example, the following <literal>Interceptor</literal> automatically sets the <literal>createTimestamp</literal> --- 905,909 ---- The <literal>Interceptor</literal> interface provides callbacks from the session to the application allowing the application to inspect and / or manipulate properties of a ! persistent object before it is saved, updated, deleted or loaded. One possible use for this is to track auditing information. For example, the following <literal>Interceptor</literal> automatically sets the <literal>createTimestamp</literal> |
From: <one...@us...> - 2002-12-24 13:45:42
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/sql In directory sc8-pr-cvs1:/tmp/cvs-serv9038/hibernate/sql Modified Files: PostgreSQLDialect.java Log Message: added cascade to PostgreSQL drop table applied Max Andersen exception message patch applied J Russel Smyth patch to allow setMaxResults() to sort of work on SAPDB fixed a bug where readonly bags did not always cascade save-update Index: PostgreSQLDialect.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/sql/PostgreSQLDialect.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** PostgreSQLDialect.java 25 Oct 2002 14:37:58 -0000 1.18 --- PostgreSQLDialect.java 24 Dec 2002 13:45:38 -0000 1.19 *************** *** 47,50 **** --- 47,55 ---- return "drop sequence " + sequenceName; } + + public String getCascadeConstraintsString() { + return " cascade"; + } + } |
From: <one...@us...> - 2002-12-24 13:45:42
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/loader In directory sc8-pr-cvs1:/tmp/cvs-serv9038/hibernate/loader Modified Files: Loader.java Log Message: added cascade to PostgreSQL drop table applied Max Andersen exception message patch applied J Russel Smyth patch to allow setMaxResults() to sort of work on SAPDB fixed a bug where readonly bags did not always cascade save-update Index: Loader.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/loader/Loader.java,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** Loader.java 24 Nov 2002 06:30:12 -0000 1.31 --- Loader.java 24 Dec 2002 13:45:37 -0000 1.32 *************** *** 107,110 **** --- 107,114 ---- returnProxies = returnProxies && Environment.jvmSupportsProxies(); + + int maxRows = (selection==null || selection.maxRows==null) ? + Integer.MAX_VALUE : + selection.maxRows.intValue(); final Loadable[] persisters = getPersisters(); *************** *** 140,144 **** final PreparedStatement st = prepareQueryStatement( getSQLString(), values, types, selection, false, session ); final ResultSet rs = getResultSet(st, namedParams, selection, session); ! try { --- 144,148 ---- final PreparedStatement st = prepareQueryStatement( getSQLString(), values, types, selection, false, session ); final ResultSet rs = getResultSet(st, namedParams, selection, session); ! try { *************** *** 146,150 **** final boolean[] hydrate = new boolean[cols]; //we can reuse it each time ! while ( rs.next() ) { for ( int i=0; i<cols; i++ ) { --- 150,154 ---- final boolean[] hydrate = new boolean[cols]; //we can reuse it each time ! for ( int count=0; count<maxRows && rs.next(); count++ ) { for ( int i=0; i<cols; i++ ) { |
From: <one...@us...> - 2002-12-24 13:45:42
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/query In directory sc8-pr-cvs1:/tmp/cvs-serv9038/hibernate/query Modified Files: FromParser.java Log Message: added cascade to PostgreSQL drop table applied Max Andersen exception message patch applied J Russel Smyth patch to allow setMaxResults() to sort of work on SAPDB fixed a bug where readonly bags did not always cascade save-update Index: FromParser.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/query/FromParser.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** FromParser.java 26 Nov 2002 03:35:44 -0000 1.11 --- FromParser.java 24 Dec 2002 13:45:38 -0000 1.12 *************** *** 28,32 **** } else { ! throw new QueryException("IN expected"); } } --- 28,32 ---- } else { ! throw new QueryException("IN expected but found: " + token); } } *************** *** 37,41 **** } else { ! throw new QueryException(", or WHERE expected"); } } --- 37,41 ---- } else { ! throw new QueryException(", or WHERE expected but found: " + token); } } |
From: <one...@us...> - 2002-12-24 13:45:42
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/engine In directory sc8-pr-cvs1:/tmp/cvs-serv9038/hibernate/engine Modified Files: Cascades.java Log Message: added cascade to PostgreSQL drop table applied Max Andersen exception message patch applied J Russel Smyth patch to allow setMaxResults() to sort of work on SAPDB fixed a bug where readonly bags did not always cascade save-update Index: Cascades.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/engine/Cascades.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Cascades.java 14 Nov 2002 11:28:55 -0000 1.7 --- Cascades.java 24 Dec 2002 13:45:37 -0000 1.8 *************** *** 222,228 **** CollectionPersister persister = session.getFactory().getCollectionPersister( pctype.getRole() ); Type elemType = persister.getElementType(); if ( action.shouldCascadeCollection(child) ) { if ( log.isTraceEnabled() ) log.trace( "cascading to collection: " + pctype.getRole() ); ! Iterator iter = pctype.getElementsIterator(child); while ( iter.hasNext() ) cascade( session, iter.next(), elemType, action, cascadeVia ); } --- 222,246 ---- CollectionPersister persister = session.getFactory().getCollectionPersister( pctype.getRole() ); Type elemType = persister.getElementType(); + Iterator iter; if ( action.shouldCascadeCollection(child) ) { if ( log.isTraceEnabled() ) log.trace( "cascading to collection: " + pctype.getRole() ); ! iter = pctype.getElementsIterator(child); ! ! } ! else { ! if (child instanceof PersistentCollection ) { ! PersistentCollection pc = (PersistentCollection) child; ! if ( pc.hasQueuedAdds() ) { ! iter = pc.queuedAddsIterator(); ! } ! else { ! iter = null; ! } ! } ! else { ! iter = null; ! } ! } ! if (iter!=null) { while ( iter.hasNext() ) cascade( session, iter.next(), elemType, action, cascadeVia ); } |
From: <one...@us...> - 2002-12-24 13:45:42
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/test In directory sc8-pr-cvs1:/tmp/cvs-serv9038/hibernate/test Modified Files: Container.hbm.xml ParentChildTest.java SQLFunctionsTest.java Log Message: added cascade to PostgreSQL drop table applied Max Andersen exception message patch applied J Russel Smyth patch to allow setMaxResults() to sort of work on SAPDB fixed a bug where readonly bags did not always cascade save-update Index: Container.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/Container.hbm.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Container.hbm.xml 7 Dec 2002 09:41:22 -0000 1.11 --- Container.hbm.xml 24 Dec 2002 13:45:38 -0000 1.12 *************** *** 41,45 **** <many-to-many column="contained_id" class="cirrus.hibernate.test.Contained" outer-join="true"/> </bag> ! <bag role="lazyBag" readonly="true" lazy="true" table="LCCBAG"> <key column="container_id"/> <many-to-many column="contained_id" class="cirrus.hibernate.test.Contained"/> --- 41,45 ---- <many-to-many column="contained_id" class="cirrus.hibernate.test.Contained" outer-join="true"/> </bag> ! <bag role="lazyBag" readonly="true" lazy="true" table="LCCBAG" cascade="save-update"> <key column="container_id"/> <many-to-many column="contained_id" class="cirrus.hibernate.test.Contained"/> Index: ParentChildTest.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/ParentChildTest.java,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** ParentChildTest.java 14 Dec 2002 08:54:42 -0000 1.33 --- ParentChildTest.java 24 Dec 2002 13:45:38 -0000 1.34 *************** *** 352,357 **** c = (Container) s.find("from c in class Container").get(0); Contained c3 = new Contained(); ! c.getBag().add(c3); ! c3.getBag().add(c); c.getLazyBag().add(c3); c3.getLazyBag().add(c); --- 352,357 ---- c = (Container) s.find("from c in class Container").get(0); Contained c3 = new Contained(); ! //c.getBag().add(c3); ! //c3.getBag().add(c); c.getLazyBag().add(c3); c3.getLazyBag().add(c); *************** *** 365,370 **** c.getLazyBag().add(c4); c4.getLazyBag().add(c); ! assertTrue( c.getLazyBag().size()==3 ); ! s.save(c4); t.commit(); s.close(); --- 365,370 ---- c.getLazyBag().add(c4); c4.getLazyBag().add(c); ! assertTrue( c.getLazyBag().size()==3 ); //forces initialization ! //s.save(c4); t.commit(); s.close(); *************** *** 379,383 **** j++; } ! assertTrue(j==4); assertTrue( c.getLazyBag().size()==3 ); s.delete(c); --- 379,383 ---- j++; } ! assertTrue(j==3); assertTrue( c.getLazyBag().size()==3 ); s.delete(c); *************** *** 389,394 **** s.delete( iter.next() ); } ! assertTrue(j==3); s.delete( s.load(Contained.class, new Long( c4.getId() ) ) ); t.commit(); s.close(); --- 389,395 ---- s.delete( iter.next() ); } ! assertTrue(j==2); s.delete( s.load(Contained.class, new Long( c4.getId() ) ) ); + s.delete( s.load(Contained.class, new Long( c3.getId() ) ) ); t.commit(); s.close(); Index: SQLFunctionsTest.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/SQLFunctionsTest.java,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** SQLFunctionsTest.java 20 Nov 2002 14:20:10 -0000 1.33 --- SQLFunctionsTest.java 24 Dec 2002 13:45:38 -0000 1.34 *************** *** 102,106 **** q = s.createQuery("from s in class Simple"); q.setMaxResults(1); - if ( ! (dialect instanceof SAPDBDialect ) ) assertTrue( q.list().size()==1 ); // setMaxRows broken in SAP JDBC driver q = s.createQuery("from s in class Simple where s.name = ?"); q.setString(0, "Simple 1"); --- 102,105 ---- |
From: <one...@us...> - 2002-12-24 13:45:42
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/collections In directory sc8-pr-cvs1:/tmp/cvs-serv9038/hibernate/collections Modified Files: PersistentCollection.java Log Message: added cascade to PostgreSQL drop table applied Max Andersen exception message patch applied J Russel Smyth patch to allow setMaxResults() to sort of work on SAPDB fixed a bug where readonly bags did not always cascade save-update Index: PersistentCollection.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/collections/PersistentCollection.java,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** PersistentCollection.java 17 Dec 2002 09:43:18 -0000 1.78 --- PersistentCollection.java 24 Dec 2002 13:45:37 -0000 1.79 *************** *** 195,198 **** --- 195,202 ---- return additions!=null; } + + public final Iterator queuedAddsIterator() { + return additions.iterator(); + } final class IteratorProxy implements Iterator { |
From: <one...@us...> - 2002-12-19 11:54:22
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/persister In directory sc8-pr-cvs1:/tmp/cvs-serv25439/hibernate/persister Modified Files: MultiTableEntityPersister.java Log Message: fixed up another bug in normalized mappings Index: MultiTableEntityPersister.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/persister/MultiTableEntityPersister.java,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** MultiTableEntityPersister.java 19 Dec 2002 11:29:03 -0000 1.44 --- MultiTableEntityPersister.java 19 Dec 2002 11:54:19 -0000 1.45 *************** *** 112,119 **** if ( type.isEntityType() ) { String path = (String) e.getKey(); String[] columns = (String[]) columnNamesByPropertyPath.get(path); EntityType etype = (EntityType) type; Type idType = factory.getIdentifierType( etype.getPersistentClass() ); - Object table = tableNumberByPropertyPath.get(path); String idpath = path + '.' + PathExpressionParser.ENTITY_ID; --- 112,124 ---- if ( type.isEntityType() ) { String path = (String) e.getKey(); + Object table = tableNumberByPropertyPath.get(path); String[] columns = (String[]) columnNamesByPropertyPath.get(path); + if ( columns.length==0 ) { + //ie. a one-to-one association + columns = getIdentifierColumnNames(); + table = new Integer(0); + } EntityType etype = (EntityType) type; Type idType = factory.getIdentifierType( etype.getPersistentClass() ); String idpath = path + '.' + PathExpressionParser.ENTITY_ID; |
From: <one...@us...> - 2002-12-19 11:29:06
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/type In directory sc8-pr-cvs1:/tmp/cvs-serv3112/hibernate/type Modified Files: TimestampType.java Log Message: applied patches by Robson Miranda and Benoit Menendez and added delimiter to drop statements in SchemaExporter Index: TimestampType.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/type/TimestampType.java,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** TimestampType.java 18 Dec 2002 12:50:39 -0000 1.31 --- TimestampType.java 19 Dec 2002 11:29:03 -0000 1.32 *************** *** 46,51 **** if (x==null || y==null) return false; ! int xTime = ( (java.util.Date) x ).getTime(); ! int yTime = ( (java.util.Date) y ).getTime(); boolean xts = x instanceof Timestamp; boolean yts = y instanceof Timestamp; --- 46,51 ---- if (x==null || y==null) return false; ! long xTime = ( (java.util.Date) x ).getTime(); ! long yTime = ( (java.util.Date) y ).getTime(); boolean xts = x instanceof Timestamp; boolean yts = y instanceof Timestamp; |
From: <one...@us...> - 2002-12-19 11:29:06
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/collections In directory sc8-pr-cvs1:/tmp/cvs-serv3112/hibernate/collections Modified Files: Map.java Log Message: applied patches by Robson Miranda and Benoit Menendez and added delimiter to drop statements in SchemaExporter Index: Map.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/collections/Map.java,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** Map.java 26 Nov 2002 03:35:41 -0000 1.46 --- Map.java 19 Dec 2002 11:29:03 -0000 1.47 *************** *** 316,320 **** java.util.Map.Entry e = (java.util.Map.Entry) iter.next(); map.put( ! persister.getElementType().assemble( (Serializable) e.getKey(), session, null), persister.getElementType().assemble( (Serializable) e.getValue(), session, null ) ); --- 316,320 ---- java.util.Map.Entry e = (java.util.Map.Entry) iter.next(); map.put( ! persister.getIndexType().assemble( (Serializable) e.getKey(), session, null), persister.getElementType().assemble( (Serializable) e.getValue(), session, null ) ); |
From: <one...@us...> - 2002-12-19 11:29:06
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools In directory sc8-pr-cvs1:/tmp/cvs-serv3112/hibernate/tools Modified Files: SchemaExport.java Log Message: applied patches by Robson Miranda and Benoit Menendez and added delimiter to drop statements in SchemaExporter Index: SchemaExport.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools/SchemaExport.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** SchemaExport.java 18 Dec 2002 13:13:06 -0000 1.13 --- SchemaExport.java 19 Dec 2002 11:29:03 -0000 1.14 *************** *** 101,106 **** for (int i = 0; i < dropSQL.length; i++) { try { ! if (script) System.out.println( dropSQL[i] ); ! if (outputFile != null) fileOutput.write( dropSQL[i] + "\n" ); if (export) { if (jdbc2) { --- 101,108 ---- for (int i = 0; i < dropSQL.length; i++) { try { ! String formatted = dropSQL[i]; ! if (delimiter!=null) formatted+=delimiter; ! if (script) System.out.println(formatted); ! if (outputFile != null) fileOutput.write( formatted + "\n" ); if (export) { if (jdbc2) { |
From: <one...@us...> - 2002-12-19 11:29:06
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/persister In directory sc8-pr-cvs1:/tmp/cvs-serv3112/hibernate/persister Modified Files: MultiTableEntityPersister.java Log Message: applied patches by Robson Miranda and Benoit Menendez and added delimiter to drop statements in SchemaExporter Index: MultiTableEntityPersister.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/persister/MultiTableEntityPersister.java,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** MultiTableEntityPersister.java 18 Dec 2002 12:25:05 -0000 1.43 --- MultiTableEntityPersister.java 19 Dec 2002 11:29:03 -0000 1.44 *************** *** 953,962 **** Type type = prop.getType(); typesByPropertyPath.put(path, type); ! if ( type.isEntityType() && ( (EntityType) type ).isOneToOne() ) { columnNamesByPropertyPath.put( path, getIdentifierColumnNames() ); } ! else { columnNamesByPropertyPath.put(path, names); ! } } --- 953,962 ---- Type type = prop.getType(); typesByPropertyPath.put(path, type); ! /*if ( type.isEntityType() && ( (EntityType) type ).isOneToOne() ) { columnNamesByPropertyPath.put( path, getIdentifierColumnNames() ); } ! else {*/ columnNamesByPropertyPath.put(path, names); ! //} } *************** *** 1033,1037 **** //remove leading " AND " if ( ojw.toUpperCase().startsWith(" AND ") ) ojw = ojw.substring(5); ! return ojw; //} --- 1033,1037 ---- //remove leading " AND " if ( ojw.toUpperCase().startsWith(" AND ") ) ojw = ojw.substring(5); ! return ( ojw.trim().length()==0 ) ? null : ojw; //} |
From: <one...@us...> - 2002-12-19 10:47:54
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/test In directory sc8-pr-cvs1:/tmp/cvs-serv23541 Modified Files: LessSimple.java Multi.hbm.xml MultiTableTest.java Log Message: test for normalized table query bugs Index: LessSimple.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/LessSimple.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** LessSimple.java 26 Nov 2002 03:35:44 -0000 1.4 --- LessSimple.java 19 Dec 2002 10:47:50 -0000 1.5 *************** *** 2,5 **** --- 2,6 ---- package cirrus.hibernate.test; + import java.util.List; import java.util.Set; *************** *** 8,11 **** --- 9,13 ---- private String foo; private Set set; + private List bag; private Simple another; private LessSimple yetanother; *************** *** 88,91 **** --- 90,109 ---- public void setYetanother(LessSimple yetanother) { this.yetanother = yetanother; + } + + /** + * Returns the bag. + * @return List + */ + public List getBag() { + return bag; + } + + /** + * Sets the bag. + * @param bag The bag to set + */ + public void setBag(List bag) { + this.bag = bag; } Index: Multi.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/Multi.hbm.xml,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Multi.hbm.xml 26 Nov 2002 08:37:26 -0000 1.17 --- Multi.hbm.xml 19 Dec 2002 10:47:51 -0000 1.18 *************** *** 13,17 **** <joined-subclass name="cirrus.hibernate.test.LessSimple" table="leafsubclass"> ! <key column="id_"/> <property name="intprop" not-null="true"/> <one-to-one name="other" class="cirrus.hibernate.test.LessSimple"/> --- 13,17 ---- <joined-subclass name="cirrus.hibernate.test.LessSimple" table="leafsubclass"> ! <key column="id__"/> <property name="intprop" not-null="true"/> <one-to-one name="other" class="cirrus.hibernate.test.LessSimple"/> *************** *** 23,26 **** --- 23,30 ---- <one-to-many class="cirrus.hibernate.test.Simple"/> </set> + <bag role="bag" lazy="true" table="simple_simple"> + <key column="simple1"/> + <many-to-many column="simple2" class="cirrus.hibernate.test.Simple"/> + </bag> </joined-subclass> Index: MultiTableTest.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/MultiTableTest.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** MultiTableTest.java 15 Dec 2002 04:54:41 -0000 1.15 --- MultiTableTest.java 19 Dec 2002 10:47:51 -0000 1.16 *************** *** 112,115 **** --- 112,118 ---- s.find("from sm in class SubMulti").size()==1 ); + + s.find("from ls in class LessSimple, s in ls.bag.elements where s.id is not null"); + t.commit(); s.close(); |
From: <one...@us...> - 2002-12-18 13:13:10
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools In directory sc8-pr-cvs1:/tmp/cvs-serv14569 Modified Files: SchemaExport.java Log Message: allow jar argument to SchemaExport (Thomas Quas) Index: SchemaExport.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools/SchemaExport.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** SchemaExport.java 27 Nov 2002 16:42:57 -0000 1.12 --- SchemaExport.java 18 Dec 2002 13:13:06 -0000 1.13 *************** *** 257,261 **** } else { ! ds.storeFile(args[i]); } --- 257,267 ---- } else { ! String filename = args[i]; ! if ( filename.endsWith( ".jar" ) ) { ! ds.storeJar(filename); ! } ! else { ! ds.storeFile(filename); ! } } |
From: <one...@us...> - 2002-12-18 12:50:42
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/type In directory sc8-pr-cvs1:/tmp/cvs-serv4862 Modified Files: LocaleType.java TimestampType.java Log Message: fixed (?) a problem with DB2 + TimestampType applied Benoit Menendez' patch to LocaleType Index: LocaleType.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/type/LocaleType.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** LocaleType.java 28 Oct 2002 15:41:53 -0000 1.3 --- LocaleType.java 18 Dec 2002 12:50:39 -0000 1.4 *************** *** 20,33 **** else { StringTokenizer tokens = new StringTokenizer(str, "_"); ! switch ( tokens.countTokens() ) { ! case 3: ! return new Locale( tokens.nextToken(), tokens.nextToken(), tokens.nextToken() ); ! case 2: ! return new Locale( tokens.nextToken(), tokens.nextToken() ); ! /*case 1: //JDK1.4 only ! return new Locale( tokens.nextToken() );*/ ! default: ! throw new HibernateException("Locale name wrong format: " + str); ! } } } --- 20,27 ---- else { StringTokenizer tokens = new StringTokenizer(str, "_"); ! String language = tokens.hasMoreTokens() ? tokens.nextToken() : ""; ! String country = tokens.hasMoreTokens() ? tokens.nextToken() : ""; ! String variant = tokens.hasMoreTokens() ? tokens.nextToken() : ""; ! return new Locale(language, country, variant); } } Index: TimestampType.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/type/TimestampType.java,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** TimestampType.java 20 Nov 2002 14:20:10 -0000 1.30 --- TimestampType.java 18 Dec 2002 12:50:39 -0000 1.31 *************** *** 46,69 **** if (x==null || y==null) return false; ! if ( ! x instanceof Timestamp && ! y instanceof Timestamp && ! ( (Timestamp) x ).getNanos() != ( (Timestamp) y ).getNanos() ! ) return false; ! ! return ( (java.util.Date) x ).getTime()==( (java.util.Date) y ).getTime(); - /*Calendar calendar1 = java.util.Calendar.getInstance(); - Calendar calendar2 = java.util.Calendar.getInstance(); - calendar1.setTime( (java.util.Date) x ); - calendar2.setTime( (java.util.Date) y ); - - return calendar1.get(Calendar.DAY_OF_MONTH) == calendar2.get(Calendar.DAY_OF_MONTH) - && calendar1.get(Calendar.MONTH) == calendar2.get(Calendar.MONTH) - && calendar1.get(Calendar.YEAR) == calendar2.get(Calendar.YEAR) - && calendar1.get(Calendar.HOUR_OF_DAY) == calendar2.get(Calendar.HOUR_OF_DAY) - && calendar1.get(Calendar.MINUTE) == calendar2.get(Calendar.MINUTE) - && calendar1.get(Calendar.SECOND) == calendar2.get(Calendar.SECOND) - && calendar1.get(Calendar.MILLISECOND) == calendar2.get(Calendar.MILLISECOND);*/ } --- 46,69 ---- if (x==null || y==null) return false; ! int xTime = ( (java.util.Date) x ).getTime(); ! int yTime = ( (java.util.Date) y ).getTime(); ! boolean xts = x instanceof Timestamp; ! boolean yts = y instanceof Timestamp; ! int xNanos = xts ? ( (Timestamp) x ).getNanos() : 0; ! int yNanos = yts ? ( (Timestamp) y ).getNanos() : 0; ! xTime += xNanos / 1000000; ! yTime += yNanos / 1000000; ! if ( xTime!=yTime ) return false; ! if (xts && yts) { ! // both are Timestamps ! int xn = xNanos % 1000000; ! int yn = yNanos % 1000000; ! return xn==yn; ! } ! else { ! // at least one is a plain old Date ! return true; ! } } |
From: <one...@us...> - 2002-12-18 12:25:08
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/persister In directory sc8-pr-cvs1:/tmp/cvs-serv30264 Modified Files: MultiTableEntityPersister.java Log Message: Robson Miranda's fix for bug in collection + joined subclass Index: MultiTableEntityPersister.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/persister/MultiTableEntityPersister.java,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** MultiTableEntityPersister.java 15 Dec 2002 04:54:41 -0000 1.42 --- MultiTableEntityPersister.java 18 Dec 2002 12:25:05 -0000 1.43 *************** *** 1054,1063 **** if (cols==null) throw new QueryException("unresolved property: " + property); if (cols.length==0) { // ie. a nested collection or a one-to-one cols = getIdentifierColumnNames(); } - - int tab = ( (Integer) tableNumberByPropertyPath.get(property) ).intValue(); return StringHelper.prefix( cols, name + ( (tab==0) ? "" : '_' + Integer.toString(tab) ) + '.' ); --- 1054,1066 ---- if (cols==null) throw new QueryException("unresolved property: " + property); + int tab; if (cols.length==0) { // ie. a nested collection or a one-to-one cols = getIdentifierColumnNames(); + tab = 0; //the root table + } + else { + tab = ( (Integer) tableNumberByPropertyPath.get(property) ).intValue(); } return StringHelper.prefix( cols, name + ( (tab==0) ? "" : '_' + Integer.toString(tab) ) + '.' ); |
From: Alok P. <ap...@dm...> - 2002-12-17 17:33:48
|
Hi, We use GUID (mapped to an Oracle RAW(16)) as out object id/primary keys. The skeletal GUID class looks like this class GUID { public byte[] getBytes() {...} public void setBytes(byte[] bits) {...} } We would like to bind these GUIDs as byte[] (PreparedStatement.setBytes) and I am trying to figure out what should the class mapping look like For example I have it currently defined as : <class name="test.Person" table="PERSON" > <id name="bits" type="binary" column="GUID"> </id> <property name="name" type="string"/> </class> and I get the following error when I try to insert a Person object. 17-Dec-2002 11:22:48.679 [ERROR] DatastoreImpl: Could not compile the mapping document cirrus.hibernate.MappingException: illegal use of an array as an identifier (arrays don't reimplement equals) at cirrus.hibernate.map.RootClass.<init>(RootClass.java:157) at cirrus.hibernate.map.Root.<init>(Root.java:145) at cirrus.hibernate.impl.DatastoreImpl.store(DatastoreImpl.java:103) at cirrus.hibernate.impl.DatastoreImpl.storeFile(DatastoreImpl.java:68) How do I specify the type of the GUID? Thanks -Alok |
From: <one...@us...> - 2002-12-17 09:43:21
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/impl In directory sc8-pr-cvs1:/tmp/cvs-serv32180/hibernate/impl Modified Files: SessionImpl.java Log Message: incremenet version number of object containing collection with a 'queued add' Index: SessionImpl.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/impl/SessionImpl.java,v retrieving revision 1.158 retrieving revision 1.159 diff -C2 -d -r1.158 -r1.159 *** SessionImpl.java 15 Dec 2002 10:46:40 -0000 1.158 --- SessionImpl.java 17 Dec 2002 09:43:18 -0000 1.159 *************** *** 2243,2247 **** if ( !entry.initialized ) return false; ! if ( entry.dirty ) return true; CollectionPersister persister = getCollectionPersister( ( (PersistentCollectionType) type).getRole() ); --- 2243,2247 ---- if ( !entry.initialized ) return false; ! if ( entry.dirty || coll.hasQueuedAdds() ) return true; CollectionPersister persister = getCollectionPersister( ( (PersistentCollectionType) type).getRole() ); *************** *** 2249,2259 **** // if the collection contains other collections, and it has been (lazily) initialized, // check if _they_ are dirty ! ! Iterator iter = coll.elements(); ! ! while ( iter.hasNext() ) { ! Object object = iter.next(); ! Type eltType = persister.getElementType(); ! if ( searchForDirtyCollections(object, eltType) ) return true; } --- 2249,2262 ---- // if the collection contains other collections, and it has been (lazily) initialized, // check if _they_ are dirty ! ! Type eltType = persister.getElementType(); ! ! if ( eltType.isPersistentCollectionType() || eltType.isComponentType() ) { //optional performance opt ! ! Iterator iter = coll.elements(); ! while ( iter.hasNext() ) { ! if ( searchForDirtyCollections( iter.next(), eltType ) ) return true; ! } ! } |
From: <one...@us...> - 2002-12-17 09:43:21
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/collections In directory sc8-pr-cvs1:/tmp/cvs-serv32180/hibernate/collections Modified Files: Bag.java List.java PersistentCollection.java Log Message: incremenet version number of object containing collection with a 'queued add' Index: Bag.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/collections/Bag.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Bag.java 7 Dec 2002 09:05:40 -0000 1.17 --- Bag.java 17 Dec 2002 09:43:18 -0000 1.18 *************** *** 239,243 **** */ public boolean add(Object o) { ! if ( !scheduleAdd(o) ) { write(); return bag.add(o); --- 239,243 ---- */ public boolean add(Object o) { ! if ( !queueAdd(o) ) { write(); return bag.add(o); *************** *** 268,272 **** */ public boolean addAll(Collection c) { ! if ( !scheduleAddAll(c) ) { write(); return bag.addAll(c); --- 268,272 ---- */ public boolean addAll(Collection c) { ! if ( !queueAddAll(c) ) { write(); return bag.addAll(c); Index: List.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/collections/List.java,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** List.java 7 Dec 2002 09:05:41 -0000 1.45 --- List.java 17 Dec 2002 09:43:18 -0000 1.46 *************** *** 113,117 **** */ public boolean add(Object object) { ! if ( !scheduleAdd(object) ) { write(); return list.add(object); --- 113,117 ---- */ public boolean add(Object object) { ! if ( !queueAdd(object) ) { write(); return list.add(object); *************** *** 142,146 **** */ public boolean addAll(Collection c) { ! if ( !scheduleAddAll(c) ) { write(); return list.addAll(c); --- 142,146 ---- */ public boolean addAll(Collection c) { ! if ( !queueAddAll(c) ) { write(); return list.addAll(c); Index: PersistentCollection.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/collections/PersistentCollection.java,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** PersistentCollection.java 7 Dec 2002 09:41:22 -0000 1.77 --- PersistentCollection.java 17 Dec 2002 09:43:18 -0000 1.78 *************** *** 61,70 **** } ! private boolean mayScheduleAdd() { return !initialized && session!=null && session.isOpen() && session.isCollectionReadOnly(this); } ! protected final boolean scheduleAdd(Object element) { ! if ( mayScheduleAdd() ) { if (additions==null) additions = new ArrayList(10); additions.add(element); --- 61,70 ---- } ! private boolean mayQueueAdd() { return !initialized && session!=null && session.isOpen() && session.isCollectionReadOnly(this); } ! protected final boolean queueAdd(Object element) { ! if ( mayQueueAdd() ) { if (additions==null) additions = new ArrayList(10); additions.add(element); *************** *** 76,81 **** } ! protected final boolean scheduleAddAll(Collection coll) { ! if ( mayScheduleAdd() ) { if (additions==null) additions = new ArrayList(20); additions.addAll(coll); --- 76,81 ---- } ! protected final boolean queueAddAll(Collection coll) { ! if ( mayQueueAdd() ) { if (additions==null) additions = new ArrayList(20); additions.addAll(coll); *************** *** 190,193 **** --- 190,197 ---- public final boolean wasInitialized() { return initialized; + } + + public final boolean hasQueuedAdds() { + return additions!=null; } |
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/sql In directory sc8-pr-cvs1:/tmp/cvs-serv16778/cirrus/hibernate/sql Modified Files: GenericDialect.java InterbaseDialect.java MySQLDialect.java OracleDialect.java SAPDBDialect.java SybaseDialect.java Log Message: added blob/clob mappings to dialects Index: GenericDialect.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/sql/GenericDialect.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GenericDialect.java 20 Oct 2002 15:54:48 -0000 1.1 --- GenericDialect.java 15 Dec 2002 11:50:46 -0000 1.2 *************** *** 26,29 **** --- 26,31 ---- register( Types.VARBINARY, "VARBINARY($l)" ); register( Types.NUMERIC, "NUMERIC(19, $l)" ); + register( Types.BLOB, "BLOB" ); + register( Types.CLOB, "CLOB" ); } Index: InterbaseDialect.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/sql/InterbaseDialect.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** InterbaseDialect.java 25 Oct 2002 14:37:58 -0000 1.15 --- InterbaseDialect.java 15 Dec 2002 11:50:46 -0000 1.16 *************** *** 27,30 **** --- 27,32 ---- register( Types.VARBINARY, "BLOB" ); register( Types.NUMERIC, "NUMERIC(18, $l)" ); + register( Types.BLOB, "BLOB" ); + register( Types.CLOB, "BLOB SUB_TYPE 1" ); getDefaultProperties().setProperty(Environment.OUTER_JOIN, "true"); Index: MySQLDialect.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/sql/MySQLDialect.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** MySQLDialect.java 14 Dec 2002 07:21:47 -0000 1.21 --- MySQLDialect.java 15 Dec 2002 11:50:46 -0000 1.22 *************** *** 33,36 **** --- 33,42 ---- register( Types.VARBINARY, 255, "VARCHAR($l) BINARY" ); register( Types.NUMERIC, "NUMERIC(19, $l)" ); + register( Types.BLOB, "LONGBLOB" ); + register( Types.BLOB, 16777215, "MEDIUMBLOB" ); + register( Types.BLOB, 65535, "BLOB" ); + register( Types.CLOB, "LONGTEXT" ); + register( Types.CLOB, 16777215, "MEDIUMTEXT" ); + register( Types.CLOB, 65535, "TEXT" ); getDefaultProperties().setProperty(Environment.OUTER_JOIN, "true"); Index: OracleDialect.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/sql/OracleDialect.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** OracleDialect.java 25 Oct 2002 14:37:58 -0000 1.28 --- OracleDialect.java 15 Dec 2002 11:50:46 -0000 1.29 *************** *** 32,35 **** --- 32,37 ---- register( Types.VARBINARY, "RAW($l)" ); register( Types.NUMERIC, "NUMBER(19, $l)" ); + register( Types.BLOB, "BLOB" ); + register( Types.CLOB, "CLOB" ); outerJoinGenerator = new OracleOuterJoinGenerator(); Index: SAPDBDialect.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/sql/SAPDBDialect.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** SAPDBDialect.java 14 Dec 2002 09:27:56 -0000 1.12 --- SAPDBDialect.java 15 Dec 2002 11:50:46 -0000 1.13 *************** *** 33,36 **** --- 33,38 ---- register( Types.VARBINARY, "LONG BYTE" ); register( Types.NUMERIC, "FIXED(19,$l)" ); + register( Types.CLOB, "LONG VARCHAR" ); + register( Types.BLOB, "LONG BYTE" ); outerJoinGenerator = new OracleOuterJoinGenerator(); Index: SybaseDialect.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/sql/SybaseDialect.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** SybaseDialect.java 27 Nov 2002 16:42:56 -0000 1.23 --- SybaseDialect.java 15 Dec 2002 11:50:46 -0000 1.24 *************** *** 27,30 **** --- 27,32 ---- register( Types.VARBINARY, "VARBINARY($l)" ); register( Types.NUMERIC, "NUMERIC(19,$l)" ); + register( Types.BLOB, "IMAGE" ); + register( Types.CLOB, "TEXT" ); getDefaultProperties().setProperty(Environment.OUTER_JOIN, "true"); |
From: <one...@us...> - 2002-12-15 11:50:49
|
Update of /cvsroot/hibernate/Hibernate In directory sc8-pr-cvs1:/tmp/cvs-serv16778 Modified Files: changelog.txt Log Message: added blob/clob mappings to dialects Index: changelog.txt =================================================================== RCS file: /cvsroot/hibernate/Hibernate/changelog.txt,v retrieving revision 1.287 retrieving revision 1.288 diff -C2 -d -r1.287 -r1.288 *** changelog.txt 15 Dec 2002 07:38:01 -0000 1.287 --- changelog.txt 15 Dec 2002 11:50:46 -0000 1.288 *************** *** 9,12 **** --- 9,13 ---- * experimental Blob/Clob support (Benoit Menendez) * improvements to SchemaUpdater (Benoit Menendez) + * deprecated suspendFlushes() / resumeFlushes() in favor of FlushMode Changes in version 1.2 final (7.12.2002) |
From: <one...@us...> - 2002-12-15 10:51:34
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate In directory sc8-pr-cvs1:/tmp/cvs-serv31987/hibernate Added Files: FlushMode.java Log Message: added FlushMode API --- NEW FILE: FlushMode.java --- //$Id: FlushMode.java,v 1.1 2002/12/15 10:51:31 oneovthafew Exp $ package cirrus.hibernate; import java.io.Serializable; import java.util.HashMap; import java.util.Map; /** * Represents a flushing strategy. The flush process synchronizes * database state with session state by detecting state changes * and executing SQL statements. * * @see Session#setFlushMode(FlushMode) */ public final class FlushMode implements Serializable { private final int level; private final String name; private static final Map instances = new HashMap(); private FlushMode(int level, String name) { this.level=level; this.name=name; } public String toString() { return name; } /** * Does this mode flush more often than the given flush mode? */ public boolean greaterThan(FlushMode mode) { return level > mode.level; } /** * Does this mode flush less often than the given flush mode? */ public boolean lessThan(FlushMode mode) { return level < mode.level; } /** * The <tt>Session</tt> is never flushed unless <tt>flush()</tt> * is explicitly called by the application. This mode is very * efficient for read only transactions. */ public static final FlushMode NEVER = new FlushMode(0, "NEVER"); /** * The <tt>Session</tt> is flushed when <tt>Transaction.commit()</tt> * is called. */ public static final FlushMode COMMIT = new FlushMode(5, "COMMIT"); /** * The <tt>Session</tt> is sometimes flushed before query execution * in order to ensure that queries never return stale state. This * is the default flush mode. */ public static final FlushMode AUTO = new FlushMode(10, "AUTO"); static { instances.put( new Integer(NEVER.level), NEVER ); instances.put( new Integer(AUTO.level), AUTO ); instances.put( new Integer(COMMIT.level), COMMIT ); } Object readResolve() { return instances.get( new Integer(level) ); } } |
From: <one...@us...> - 2002-12-15 10:46:43
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/transaction In directory sc8-pr-cvs1:/tmp/cvs-serv30186/hibernate/transaction Modified Files: JDBCTransaction.java JTATransaction.java Log Message: added FlushMode API Index: JDBCTransaction.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/transaction/JDBCTransaction.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** JDBCTransaction.java 8 Oct 2002 15:46:42 -0000 1.9 --- JDBCTransaction.java 15 Dec 2002 10:46:40 -0000 1.10 *************** *** 7,10 **** --- 7,11 ---- import org.apache.commons.logging.LogFactory; + import cirrus.hibernate.FlushMode; import cirrus.hibernate.HibernateException; import cirrus.hibernate.Transaction; *************** *** 49,53 **** try { ! session.flush(); try { session.connection().commit(); --- 50,54 ---- try { ! if ( session.getFlushMode()!=FlushMode.NEVER ) session.flush(); try { session.connection().commit(); Index: JTATransaction.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/transaction/JTATransaction.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** JTATransaction.java 8 Oct 2002 15:46:42 -0000 1.7 --- JTATransaction.java 15 Dec 2002 10:46:40 -0000 1.8 *************** *** 9,12 **** --- 9,13 ---- import javax.transaction.TransactionManager; import javax.transaction.UserTransaction; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; *************** *** 15,18 **** --- 16,20 ---- import cirrus.hibernate.AssertionFailure; + import cirrus.hibernate.FlushMode; import cirrus.hibernate.HibernateException; import cirrus.hibernate.Transaction; *************** *** 46,50 **** try { ! session.flush(); try { if (newTransaction) ut.commit(); --- 48,52 ---- try { ! if ( session.getFlushMode()!=FlushMode.NEVER ) session.flush(); try { if (newTransaction) ut.commit(); |
From: <one...@us...> - 2002-12-15 10:46:43
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/impl In directory sc8-pr-cvs1:/tmp/cvs-serv30186/hibernate/impl Modified Files: SessionImpl.java Log Message: added FlushMode API Index: SessionImpl.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/impl/SessionImpl.java,v retrieving revision 1.157 retrieving revision 1.158 diff -C2 -d -r1.157 -r1.158 *** SessionImpl.java 7 Dec 2002 09:05:41 -0000 1.157 --- SessionImpl.java 15 Dec 2002 10:46:40 -0000 1.158 *************** *** 25,28 **** --- 25,29 ---- import cirrus.hibernate.AssertionFailure; + import cirrus.hibernate.FlushMode; import cirrus.hibernate.HibernateException; import cirrus.hibernate.Interceptor; *************** *** 74,78 **** private boolean closed = false; ! private boolean autoFlush = true; private boolean callAfterTransactionCompletionFromDisconnect = true; --- 75,80 ---- private boolean closed = false; ! private FlushMode flushMode = FlushMode.AUTO; ! //private boolean autoFlush = true; private boolean callAfterTransactionCompletionFromDisconnect = true; *************** *** 1212,1226 **** public void suspendFlushes() { ! log.trace("disabling flush-before-query"); ! autoFlush=false; } public void resumeFlushes() { ! log.trace("enabling flush-before-query"); ! autoFlush=true; } private boolean autoFlushIfRequired(Set querySpaces) throws HibernateException, SQLException { ! if ( autoFlush && dontFlushFromFind==0 ) { /*if ( log.isTraceEnabled() ) { --- 1214,1233 ---- public void suspendFlushes() { ! setFlushMode(FlushMode.COMMIT); } public void resumeFlushes() { ! setFlushMode(FlushMode.AUTO); ! } ! ! public void setFlushMode(FlushMode flushMode) { ! this.flushMode = flushMode; ! } ! public FlushMode getFlushMode() { ! return flushMode; } private boolean autoFlushIfRequired(Set querySpaces) throws HibernateException, SQLException { ! if ( flushMode==FlushMode.AUTO && dontFlushFromFind==0 ) { /*if ( log.isTraceEnabled() ) { |