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-11-21 07:51:21
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/test
In directory sc8-pr-cvs1:/tmp/cvs-serv15682/cirrus/hibernate/test
Modified Files:
FooBarTest.java
Log Message:
new tests
minor dtd change
Index: FooBarTest.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/FooBarTest.java,v
retrieving revision 1.224
retrieving revision 1.225
diff -C2 -d -r1.224 -r1.225
*** FooBarTest.java 20 Nov 2002 14:20:09 -0000 1.224
--- FooBarTest.java 21 Nov 2002 07:51:18 -0000 1.225
***************
*** 640,643 ****
--- 640,650 ----
public void testFind() throws Exception {
Session s = sessions.openSession();
+
+ s.iterate("from bz in class Baz where bz.setArray[0].size=0");
+ s.iterate("from bz in class Baz where not 'foo' in bz.setArray[0].elements");
+ s.iterate("from bz in class Baz where 3 in bz.stringArrayMap['foo'].indices");
+ s.iterate("from bz in class Baz where bz.stringArrayMap['foo'][0] = 'foo'");
+ //s.iterate("from bz in class Baz where bz.components[1].name='foo'");
+
Bar bar = new Bar();
s.save(bar);
|
|
From: <one...@us...> - 2002-11-21 07:51:21
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate
In directory sc8-pr-cvs1:/tmp/cvs-serv15682/cirrus/hibernate
Modified Files:
hibernate-mapping-1.1.dtd
Log Message:
new tests
minor dtd change
Index: hibernate-mapping-1.1.dtd
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/hibernate-mapping-1.1.dtd,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** hibernate-mapping-1.1.dtd 19 Nov 2002 10:42:17 -0000 1.12
--- hibernate-mapping-1.1.dtd 21 Nov 2002 07:51:17 -0000 1.13
***************
*** 41,48 ****
<!ATTLIST class schema CDATA #IMPLIED> <!-- default: none -->
<!ATTLIST class proxy CDATA #IMPLIED> <!-- default: no proxy interface -->
<!ATTLIST class mutable (true|false) "true">
- <!ATTLIST class persister CDATA #IMPLIED>
<!ATTLIST class polymorphism (implicit|explicit) "implicit">
! <!ATTLIST class discriminator-value CDATA #IMPLIED> <!-- default: unqualified class name | none -->
<!-- Declares the id type, column and generation algorithm for an entity class.
--- 41,48 ----
<!ATTLIST class schema CDATA #IMPLIED> <!-- default: none -->
<!ATTLIST class proxy CDATA #IMPLIED> <!-- default: no proxy interface -->
+ <!ATTLIST class discriminator-value CDATA #IMPLIED> <!-- default: unqualified class name | none -->
<!ATTLIST class mutable (true|false) "true">
<!ATTLIST class polymorphism (implicit|explicit) "implicit">
! <!ATTLIST class persister CDATA #IMPLIED>
<!-- Declares the id type, column and generation algorithm for an entity class.
|
|
From: <one...@us...> - 2002-11-21 07:45:00
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/query
In directory sc8-pr-cvs1:/tmp/cvs-serv14321/cirrus/hibernate/query
Modified Files:
PathExpressionParser.java WhereParser.java
Log Message:
support for subcollections in query language: foo.bars[2]['index'], foo.bars[4].elements, foo.bars[0].size
Index: PathExpressionParser.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/query/PathExpressionParser.java,v
retrieving revision 1.62
retrieving revision 1.63
diff -C2 -d -r1.62 -r1.63
*** PathExpressionParser.java 26 Oct 2002 16:43:27 -0000 1.62
--- PathExpressionParser.java 21 Nov 2002 07:44:57 -0000 1.63
***************
*** 44,47 ****
--- 44,48 ----
private String path;
private boolean skippedId;
+ private boolean continuation;
private void addJoin(String name, String[] rhsCols, QueryTranslator q) throws QueryException {
***************
*** 56,59 ****
--- 57,96 ----
}
}
+
+ public String continueFromManyToMany(Class clazz, String[] joinColumns, QueryTranslator q) throws QueryException {
+ start(q);
+ continuation=true;
+ currentName = q.createNameFor(clazz);
+ q.addType( currentName, clazz.getName() );
+
+ join.append(" and ")
+ .append( joinColumns[0] )
+ .append('=')
+ .append(currentName)
+ .append('.')
+ .append( q.getPersister(clazz).getIdentifierColumnNames()[0] );
+ //TODO: composite keys!
+ return currentName;
+ }
+
+ public String continueFromSubcollection(String role, String[] joinColumns, QueryTranslator q) throws QueryException {
+ start(q);
+ continuation=true;
+ collectionName = q.createNameForCollection(role);
+ collectionRole = role;
+ currentName=null;
+ currentProperty=null;
+ CollectionPersister p = q.getCollectionPersister(role);
+ collectionTable = p.getQualifiedTableName();
+
+ join.append(" and ")
+ .append( joinColumns[0] )
+ .append('=')
+ .append(collectionName)
+ .append('.')
+ .append( p.getKeyColumnNames()[0] );
+ //TODO: composite keys!
+ return collectionName;
+ }
***************
*** 73,81 ****
else {
if ( dotcount==0 ) {
! if ( !q.isName(token) ) throw new QueryException("undefined alias: " + token);
! currentName=token;
}
else if (dotcount==1) {
! currentProperty = token;
}
else { // dotcount>=2
--- 110,130 ----
else {
if ( dotcount==0 ) {
! if (!continuation) {
! if ( !q.isName(token) ) throw new QueryException("undefined alias: " + token);
! currentName=token;
! }
}
else if (dotcount==1) {
! if (currentName!=null) {
! currentProperty = token;
! }
! else if (collectionName!=null) {
! CollectionPersister p = q.getCollectionPersister(collectionRole);
! doCollectionProperty(token, p, collectionName);
! continuation = false;
! }
! else {
! throw new QueryException("unexpected");
! }
}
else { // dotcount>=2
***************
*** 84,88 ****
Type propertyType = getPropertyType(q);
! if (propertyType==null) throw new QueryException("unresolved property: " + currentProperty);
if ( propertyType.isComponentType() ) {
--- 133,139 ----
Type propertyType = getPropertyType(q);
! if (propertyType==null) {
! throw new QueryException("unresolved property: " + currentProperty);
! }
if ( propertyType.isComponentType() ) {
***************
*** 126,136 ****
collectionRole = ( (PersistentCollectionType) propertyType ).getRole();
! CollectionPersister memberPersister = q.getCollectionPersister(collectionRole);
! String[] colNames = memberPersister.getKeyColumnNames();
String name = q.createNameForCollection(collectionRole);
addJoin(name, colNames, q);
! doCollectionProperty(token, memberPersister, name);
collectionName = name;
! collectionTable = memberPersister.getQualifiedTableName();
currentName=null;
currentProperty=null;
--- 177,187 ----
collectionRole = ( (PersistentCollectionType) propertyType ).getRole();
! CollectionPersister p = q.getCollectionPersister(collectionRole);
! String[] colNames = p.getKeyColumnNames();
String name = q.createNameForCollection(collectionRole);
addJoin(name, colNames, q);
! doCollectionProperty(token, p, name);
collectionName = name;
! collectionTable = p.getQualifiedTableName();
currentName=null;
currentProperty=null;
***************
*** 198,206 ****
expectingCollectionIndex = false;
skippedId = false;
}
public void start(QueryTranslator q) {
! reset();
! path = "";
}
--- 249,260 ----
expectingCollectionIndex = false;
skippedId = false;
+ continuation = false;
}
public void start(QueryTranslator q) {
! if (!continuation) {
! reset();
! path = "";
! }
}
***************
*** 212,230 ****
else {
! Type propertyType = getPropertyType(q);
! if ( propertyType!=null && propertyType.isPersistentCollectionType() ) {
! //special case: expecting a [index]
! collectionRole = ( (PersistentCollectionType) propertyType ).getRole();
CollectionPersister memberPersister = q.getCollectionPersister(collectionRole);
if ( !memberPersister.hasIndex() ) throw new QueryException("unindexed collection before []");
! String name = q.createNameForCollection(collectionRole);
String[] keyCols = memberPersister.getKeyColumnNames();
! addJoin(name, keyCols, q);
String[] indexCols = memberPersister.getIndexColumnNames();
if ( indexCols.length!=1 ) throw new QueryException("composite-index appears in []");
join.append(" and ")
! .append(name)
.append('.')
.append( indexCols[0] )
--- 266,289 ----
else {
! if (!continuation) {
! Type propertyType = getPropertyType(q);
! if ( propertyType!=null && propertyType.isPersistentCollectionType() ) {
! collectionRole = ( (PersistentCollectionType) propertyType ).getRole();
! collectionName = q.createNameForCollection(collectionRole);
! }
! }
! if (collectionRole!=null) {
! //special case; expecting: [index]
CollectionPersister memberPersister = q.getCollectionPersister(collectionRole);
if ( !memberPersister.hasIndex() ) throw new QueryException("unindexed collection before []");
!
String[] keyCols = memberPersister.getKeyColumnNames();
! if (!continuation) addJoin(collectionName, keyCols, q);
String[] indexCols = memberPersister.getIndexColumnNames();
if ( indexCols.length!=1 ) throw new QueryException("composite-index appears in []");
join.append(" and ")
! .append(collectionName)
.append('.')
.append( indexCols[0] )
***************
*** 232,247 ****
String[] eltCols = memberPersister.getElementColumnNames();
! if ( eltCols.length!=1 ) throw new QueryException("composite-id collection element []");
CollectionElement elem = new CollectionElement();
! elem.elementColumn = name + '.' + eltCols[0];
elem.type = memberPersister.getElementType();
elem.isOneToMany = memberPersister.isOneToMany();
! elem.alias = name;
elem.join = join.toString();
collectionElements.addLast(elem);
setExpectingCollectionIndex();
! q.addCollection(name, collectionRole);
}
else {
--- 291,306 ----
String[] eltCols = memberPersister.getElementColumnNames();
! //if ( eltCols.length!=1 ) throw new QueryException("composite-id collection element []");
CollectionElement elem = new CollectionElement();
! elem.elementColumns = StringHelper.prefix( eltCols, collectionName + '.' );
elem.type = memberPersister.getElementType();
elem.isOneToMany = memberPersister.isOneToMany();
! elem.alias = collectionName;
elem.join = join.toString();
collectionElements.addLast(elem);
setExpectingCollectionIndex();
! q.addCollection(collectionName, collectionRole);
}
else {
***************
*** 251,254 ****
--- 310,317 ----
}
+
+ //important!!
+ continuation=false;
+
}
***************
*** 257,261 ****
boolean isOneToMany;
String alias;
! String elementColumn;
String join;
StringBuffer indexValue = new StringBuffer();
--- 320,324 ----
boolean isOneToMany;
String alias;
! String[] elementColumns;
String join;
StringBuffer indexValue = new StringBuffer();
***************
*** 293,297 ****
}
! public String getCollectionSubquery() throws QueryException {
return new StringBuffer( "SELECT " )
.append( StringHelper.join( ", ", collectionElementColumns ) )
--- 356,361 ----
}
! public String getCollectionSubquery(String extraJoin) throws QueryException {
! if (extraJoin!=null) join.append(extraJoin);
return new StringBuffer( "SELECT " )
.append( StringHelper.join( ", ", collectionElementColumns ) )
Index: WhereParser.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/query/WhereParser.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** WhereParser.java 20 Nov 2002 07:06:44 -0000 1.39
--- WhereParser.java 21 Nov 2002 07:44:57 -0000 1.40
***************
*** 16,19 ****
--- 16,20 ----
import cirrus.hibernate.type.EntityType;
import cirrus.hibernate.type.LiteralType;
+ import cirrus.hibernate.type.PersistentCollectionType;
import cirrus.hibernate.type.Type;
import cirrus.hibernate.type.TypeFactory;
***************
*** 148,152 ****
private LinkedList nots = new LinkedList(); //were an odd or even number of NOTs encountered
private LinkedList joins = new LinkedList(); //the join string built up by compound paths inside this expression
! private LinkedList booleanTests = new LinkedList(); //a flag indicating if the subexpression is known to be boolean
public void token(String token, QueryTranslator q) throws QueryException {
--- 149,177 ----
private LinkedList nots = new LinkedList(); //were an odd or even number of NOTs encountered
private LinkedList joins = new LinkedList(); //the join string built up by compound paths inside this expression
! private LinkedList booleanTests = new LinkedList(); //a flag indicating if the subexpression is known to be boolean
! private String collectionJoin;
!
! private String getElementName(PathExpressionParser.CollectionElement element, QueryTranslator q) throws QueryException {
! String name;
! if ( element.isOneToMany ) {
! name = element.alias;
! }
! else {
! Type type = element.type;
! Class clazz;
! if ( type.isEntityType() ) { //ie. a many-to-many
! clazz = ( (EntityType) type ).getPersistentClass();
! name = pathExpressionParser.continueFromManyToMany(clazz, element.elementColumns, q);
! }
! else if ( type.isPersistentCollectionType() ) { //ie. a subcollection
! String role = ( (PersistentCollectionType) type ).getRole();
! name = pathExpressionParser.continueFromSubcollection(role, element.elementColumns, q);
! }
! else {
! throw new QueryException("illegally dereferenced collection element");
! }
! }
! return name;
! }
public void token(String token, QueryTranslator q) throws QueryException {
***************
*** 156,160 ****
//Cope with [,]
! if ( token.equals("[") ) {
if (expectingIndex==0) throw new QueryException("unexpected [");
return;
--- 181,186 ----
//Cope with [,]
! if ( token.equals("[") && !expectingPathContinuation ) {
! expectingPathContinuation = false;
if (expectingIndex==0) throw new QueryException("unexpected [");
return;
***************
*** 175,201 ****
if ( token.startsWith(".") ) { // the path expression continues after a ]
! String name;
! if ( element.isOneToMany ) {
! name = element.alias;
! }
! else {
! Type type = element.type;
! Class clazz ;
! if ( type.isEntityType() ) {
! clazz = ( (EntityType) type ).getPersistentClass();
! name = q.createNameFor(clazz);
! q.addType( name, clazz.getName() );
! }
! else {
! throw new QueryException("illegally dereferenced collection element");
! }
! //TODO: move this to PathExpressionParser.end()
! addToCurrentJoin(" and ");
! addToCurrentJoin(element.elementColumn);
! addToCurrentJoin("=");
! addToCurrentJoin( name + '.' + q.getPersister(clazz).getIdentifierColumnNames()[0] );
! }
!
! token(name + token, q); // careful with this!
addToCurrentJoin(element.join);
--- 201,205 ----
if ( token.startsWith(".") ) { // the path expression continues after a ]
! doPathExpression( getElementName(element, q) + token, q ); // careful with this!
addToCurrentJoin(element.join);
***************
*** 204,209 ****
}
else { // the path expression ends at the ]
! appendToken( q, element.elementColumn );
addToCurrentJoin(element.join);
addToCurrentJoin( element.indexValue.toString() );
--- 208,220 ----
}
+ else if ( token.equals("[") ) {
+ doPathExpression( getElementName(element, q), q );
+ addToCurrentJoin(element.join);
+ addToCurrentJoin( element.indexValue.toString() );
+ return; //NOTE: EARLY EXIT!
+ }
else { // the path expression ends at the ]
! if ( element.elementColumns.length!=1 ) throw new QueryException("path expression ended in composite collection element");
! appendToken( q, element.elementColumns[0] );
addToCurrentJoin(element.join);
addToCurrentJoin( element.indexValue.toString() );
***************
*** 293,297 ****
expectingPathContinuation=false;
PathExpressionParser.CollectionElement element = pathExpressionParser.lastCollectionElement();
! appendToken( q, element.elementColumn );
addToCurrentJoin(element.join);
addToCurrentJoin( element.indexValue.toString() );
--- 304,309 ----
expectingPathContinuation=false;
PathExpressionParser.CollectionElement element = pathExpressionParser.lastCollectionElement();
! if ( element.elementColumns.length!=1 ) throw new QueryException("path expression ended in composite collection element");
! appendToken( q, element.elementColumns[0] );
addToCurrentJoin(element.join);
addToCurrentJoin( element.indexValue.toString() );
***************
*** 343,370 ****
appendToken(q, "(");
}*/
!
! private void doToken(String token, QueryTranslator q) throws QueryException {
! if ( q.isName( StringHelper.root(token) ) ) { //path expression
! StringTokenizer tokens = new StringTokenizer(token, ".", true);
! pathExpressionParser.start(q);
! while( tokens.hasMoreTokens() ) {
! pathExpressionParser.token( tokens.nextToken(), q);
! }
! pathExpressionParser.end(q);
! if ( pathExpressionParser.isCollectionValued() ) {
! openExpression(q, "");
! appendToken( q, pathExpressionParser.getCollectionSubquery() );
! q.addIdentifierSpace( pathExpressionParser.getCollectionTable() );
! closeExpression(q, "");
}
else {
! if ( pathExpressionParser.isExpectingCollectionIndex() ) {
! expectingIndex++;
! }
! else {
! addToCurrentJoin( pathExpressionParser.getWhereJoin() );
! appendToken( q, pathExpressionParser.getWhereColumn() );
! }
}
}
else if ( token.startsWith(ParserHelper.HQL_VARIABLE_PREFIX) ) { //named query parameter
--- 355,387 ----
appendToken(q, "(");
}*/
!
! private void doPathExpression(String token, QueryTranslator q) throws QueryException {
! StringTokenizer tokens = new StringTokenizer(token, ".", true);
! pathExpressionParser.start(q);
! while( tokens.hasMoreTokens() ) {
! pathExpressionParser.token( tokens.nextToken(), q);
! }
! pathExpressionParser.end(q);
! if ( pathExpressionParser.isCollectionValued() ) {
! openExpression(q, "");
! appendToken( q, pathExpressionParser.getCollectionSubquery(collectionJoin) );
! q.addIdentifierSpace( pathExpressionParser.getCollectionTable() );
! closeExpression(q, "");
! collectionJoin = null;
! }
! else {
! if ( pathExpressionParser.isExpectingCollectionIndex() ) {
! expectingIndex++;
}
else {
! addToCurrentJoin( pathExpressionParser.getWhereJoin() );
! appendToken( q, pathExpressionParser.getWhereColumn() );
}
+ }
+ }
+
+ private void doToken(String token, QueryTranslator q) throws QueryException {
+ if ( q.isName( StringHelper.root(token) ) ) { //path expression
+ doPathExpression(token, q);
}
else if ( token.startsWith(ParserHelper.HQL_VARIABLE_PREFIX) ) { //named query parameter
|
|
From: <one...@us...> - 2002-11-21 07:45:00
|
Update of /cvsroot/hibernate/Hibernate In directory sc8-pr-cvs1:/tmp/cvs-serv14321 Modified Files: changelog.txt Log Message: support for subcollections in query language: foo.bars[2]['index'], foo.bars[4].elements, foo.bars[0].size Index: changelog.txt =================================================================== RCS file: /cvsroot/hibernate/Hibernate/changelog.txt,v retrieving revision 1.269 retrieving revision 1.270 diff -C2 -d -r1.269 -r1.270 *** changelog.txt 20 Nov 2002 10:30:45 -0000 1.269 --- changelog.txt 21 Nov 2002 07:44:57 -0000 1.270 *************** *** 1,5 **** Hibernate Changelog =================== ! Changes in version 1.2 beta 3 (xx.11.2002) ------------------------------------------ * fixed bug in UPDATE SQL generation for normalized mapping strategy (fix by Robson Miranda) --- 1,5 ---- Hibernate Changelog =================== ! Changes in version 1.2 beta 3 (21.11.2002) ------------------------------------------ * fixed bug in UPDATE SQL generation for normalized mapping strategy (fix by Robson Miranda) *************** *** 12,15 **** --- 12,17 ---- * support for PostgreSQL ~ operator (regular expression match) * load(id, lockMode) now working for normalized table mappings + * now compiling properly under JDK1.2, 1.3 (fix by Tom Cellucci) + * support for subcollections in query language: foo.bars[2]['index'], foo.bars[4].elements, foo.bars[0].size, etc. Changes in version 1.2 beta 2 (15.11.2002) |
Update of /cvsroot/hibernate/Hibernate/doc In directory sc8-pr-cvs1:/tmp/cvs-serv12403 Modified Files: dtd.aft dtd.html features.aft features.html Removed Files: hibernate-design.jpg tutorial.aft tutorial.aft-TOC tutorial.html Log Message: removed obsolete doco Index: dtd.aft =================================================================== RCS file: /cvsroot/hibernate/Hibernate/doc/dtd.aft,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** dtd.aft 11 Nov 2002 16:04:55 -0000 1.10 --- dtd.aft 20 Nov 2002 14:55:46 -0000 1.11 *************** *** 5,15 **** <?xml version='1.0' encoding='utf-8'?> ! <!-- Hibernate Mapping DTD. ! <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 1.1//EN" "http://hibernate.sourceforge.net/hibernate-mapping-1.1.dtd"> ! An instance of this XML document may contain mappings for an arbitrary number of classes. The class mappings may contain associations to classes --- 5,15 ---- <?xml version='1.0' encoding='utf-8'?> ! <!-- Hibernate Mapping DTD. ! <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 1.1//EN" "http://hibernate.sourceforge.net/hibernate-mapping-1.1.dtd"> ! An instance of this XML document may contain mappings for an arbitrary number of classes. The class mappings may contain associations to classes *************** *** 19,27 **** be referenced by later class and collection mappings in the same document. (They must be declared before they are used.) ! --> ! <!-- The document root. --> ! <!ELEMENT hibernate-mapping ( (map|set|list|bag|array|primitive-array)*, --- 19,27 ---- be referenced by later class and collection mappings in the same document. (They must be declared before they are used.) ! --> ! <!-- The document root. --> ! <!ELEMENT hibernate-mapping ( (map|set|list|bag|array|primitive-array)*, *************** *** 31,37 **** <!ATTLIST hibernate-mapping schema CDATA #IMPLIED> <!-- default: none --> <!ATTLIST hibernate-mapping default-cascade (none|save-update|all) "none"> ! <!-- Root of an entity class hierarchy. Entities have their own tables. --> ! <!ELEMENT class ( jcs-cache?, --- 31,37 ---- <!ATTLIST hibernate-mapping schema CDATA #IMPLIED> <!-- default: none --> <!ATTLIST hibernate-mapping default-cascade (none|save-update|all) "none"> ! <!-- Root of an entity class hierarchy. Entities have their own tables. --> ! <!ELEMENT class ( jcs-cache?, *************** *** 40,60 **** (version|timestamp)?, (property|many-to-one|one-to-one|collection|component|map|set|list|bag|array|primitive-array)*, ! ((subclass*)|(joined-subclass*)), ! cache? )> <!ATTLIST class name CDATA #REQUIRED> ! <!ATTLIST class table CDATA #IMPLIED> <!-- default: unqualified classname --> ! <!ATTLIST class schema CDATA #IMPLIED> <!-- default: none --> ! <!ATTLIST class proxy CDATA #IMPLIED> <!-- default: no proxy interface --> <!ATTLIST class mutable (true|false) "true"> ! <!ATTLIST class persister CDATA #IMPLIED> <!-- default: cirrus.hibernate.persister.EntityPersister --> ! ! <!ATTLIST class discriminator-value CDATA #IMPLIED> <!-- default: unqualified class name | none --> ! <!-- Declares the id type, column and generation algorithm for an entity class. If a name attribut is given, the id is exposed to the application through the named property of the class. If not, the id is only exposed to the application through Session.getID()--> ! <!ELEMENT id (column?, generator)> <!ATTLIST id name CDATA #IMPLIED> --- 40,59 ---- (version|timestamp)?, (property|many-to-one|one-to-one|collection|component|map|set|list|bag|array|primitive-array)*, ! ((subclass*)|(joined-subclass*)) )> <!ATTLIST class name CDATA #REQUIRED> ! <!ATTLIST class table CDATA #IMPLIED> <!-- default: unqualified classname --> ! <!ATTLIST class schema CDATA #IMPLIED> <!-- default: none --> ! <!ATTLIST class proxy CDATA #IMPLIED> <!-- default: no proxy interface --> ! <!ATTLIST class discriminator-value CDATA #IMPLIED> <!-- default: unqualified class name | none --> <!ATTLIST class mutable (true|false) "true"> ! <!ATTLIST class polymorphism (implicit|explicit) "implicit"> ! <!ATTLIST class persister CDATA #IMPLIED> ! <!-- Declares the id type, column and generation algorithm for an entity class. If a name attribut is given, the id is exposed to the application through the named property of the class. If not, the id is only exposed to the application through Session.getID()--> ! <!ELEMENT id (column?, generator)> <!ATTLIST id name CDATA #IMPLIED> *************** *** 63,99 **** <!ATTLIST id length CDATA #IMPLIED> <!ATTLIST id unsaved-value CDATA "any"> <!-- any|none|null|"value" --> ! <!-- A composite key may be modelled by a java class with a property for each key column. The class must implement java.io.Serializable and reimplement equals() and hashCode(). --> ! <!ELEMENT composite-id ( (key-property|key-many-to-one)+ )> <!ATTLIST composite-id class CDATA #IMPLIED> <!ATTLIST composite-id name CDATA #IMPLIED> <!ATTLIST composite-id unsaved-value (any|none|null) "any"> <!-- default: any --> ! <!-- Polymorphic data requires a column holding a class discriminator value. This value is not directly exposed to the application. --> ! <!ELEMENT discriminator (column?)> <!ATTLIST discriminator column CDATA #IMPLIED> <!-- default: "class"|none --> <!ATTLIST discriminator type CDATA "string"> <!ATTLIST discriminator length CDATA #IMPLIED> ! <!-- Versioned data requires a column holding a version number. This is exposed to the application through a property of the Java class. --> ! <!ELEMENT version EMPTY> <!ATTLIST version name CDATA #REQUIRED> <!ATTLIST version column CDATA #IMPLIED> <!ATTLIST version type CDATA "integer"> ! <!ELEMENT timestamp EMPTY> <!ATTLIST timestamp name CDATA #REQUIRED> <!ATTLIST timestamp column CDATA #IMPLIED> ! <!-- Subclass declarations are nested beneath the root class declaration to achieve polymorphic persistence. --> ! <!ELEMENT subclass ( (property|many-to-one|one-to-one|collection|component|map|set|list|bag|array|primitive-array)*, --- 62,98 ---- <!ATTLIST id length CDATA #IMPLIED> <!ATTLIST id unsaved-value CDATA "any"> <!-- any|none|null|"value" --> ! <!-- A composite key may be modelled by a java class with a property for each key column. The class must implement java.io.Serializable and reimplement equals() and hashCode(). --> ! <!ELEMENT composite-id ( (key-property|key-many-to-one)+ )> <!ATTLIST composite-id class CDATA #IMPLIED> <!ATTLIST composite-id name CDATA #IMPLIED> <!ATTLIST composite-id unsaved-value (any|none|null) "any"> <!-- default: any --> ! <!-- Polymorphic data requires a column holding a class discriminator value. This value is not directly exposed to the application. --> ! <!ELEMENT discriminator (column?)> <!ATTLIST discriminator column CDATA #IMPLIED> <!-- default: "class"|none --> <!ATTLIST discriminator type CDATA "string"> <!ATTLIST discriminator length CDATA #IMPLIED> ! <!-- Versioned data requires a column holding a version number. This is exposed to the application through a property of the Java class. --> ! <!ELEMENT version EMPTY> <!ATTLIST version name CDATA #REQUIRED> <!ATTLIST version column CDATA #IMPLIED> <!ATTLIST version type CDATA "integer"> ! <!ELEMENT timestamp EMPTY> <!ATTLIST timestamp name CDATA #REQUIRED> <!ATTLIST timestamp column CDATA #IMPLIED> ! <!-- Subclass declarations are nested beneath the root class declaration to achieve polymorphic persistence. --> ! <!ELEMENT subclass ( (property|many-to-one|one-to-one|collection|component|map|set|list|bag|array|primitive-array)*, *************** *** 103,109 **** <!ATTLIST subclass proxy CDATA #IMPLIED> <!-- default: no proxy interface --> <!ATTLIST subclass discriminator-value CDATA #IMPLIED> <!-- default: unqualified class name | none --> ! <!-- Joined subclasses are used for the normalized table-per-subclass mapping strategy --> ! <!ELEMENT joined-subclass ( key, --- 102,108 ---- <!ATTLIST subclass proxy CDATA #IMPLIED> <!-- default: no proxy interface --> <!ATTLIST subclass discriminator-value CDATA #IMPLIED> <!-- default: unqualified class name | none --> ! <!-- Joined subclasses are used for the normalized table-per-subclass mapping strategy --> ! <!ELEMENT joined-subclass ( key, *************** *** 115,122 **** <!ATTLIST joined-subclass table CDATA #REQUIRED> <!ATTLIST joined-subclass schema CDATA #IMPLIED> ! <!-- Property of an entity class or component, component-element, composite-id, etc. JavaBeans style properties are mapped to table columns. --> ! <!ELEMENT property (column*)> <!ATTLIST property name CDATA #REQUIRED> --- 114,121 ---- <!ATTLIST joined-subclass table CDATA #REQUIRED> <!ATTLIST joined-subclass schema CDATA #IMPLIED> ! <!-- Property of an entity class or component, component-element, composite-id, etc. JavaBeans style properties are mapped to table columns. --> ! <!ELEMENT property (column*)> <!ATTLIST property name CDATA #REQUIRED> *************** *** 126,133 **** <!ATTLIST property not-null (true|false) "false"> <!ATTLIST property unique (true|false) "false"> ! <!-- Declares an association between two entities (Or from a component, component element, etc. to an entity). --> ! <!ELEMENT many-to-one (column*)> <!ATTLIST many-to-one name CDATA #REQUIRED> --- 125,132 ---- <!ATTLIST property not-null (true|false) "false"> <!ATTLIST property unique (true|false) "false"> ! <!-- Declares an association between two entities (Or from a component, component element, etc. to an entity). --> ! <!ELEMENT many-to-one (column*)> <!ATTLIST many-to-one name CDATA #REQUIRED> *************** *** 138,145 **** <!ATTLIST many-to-one cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> <!ATTLIST many-to-one outer-join (true|false|auto) "auto"> ! <!-- Declares a one-to-one association between two entities (Or from a component, component element, etc. to an entity). --> ! <!ELEMENT one-to-one EMPTY> <!ATTLIST one-to-one name CDATA #REQUIRED> --- 137,144 ---- <!ATTLIST many-to-one cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> <!ATTLIST many-to-one outer-join (true|false|auto) "auto"> ! <!-- Declares a one-to-one association between two entities (Or from a component, component element, etc. to an entity). --> ! <!ELEMENT one-to-one EMPTY> <!ATTLIST one-to-one name CDATA #REQUIRED> *************** *** 148,154 **** <!ATTLIST one-to-one outer-join (true|false|auto) "auto"> <!ATTLIST one-to-one constrained (true|false) "false"> ! <!-- A property embedded in a composite identifier or map index (always not-null). --> ! <!ELEMENT key-property (column*)> <!ATTLIST key-property name CDATA #REQUIRED> --- 147,153 ---- <!ATTLIST one-to-one outer-join (true|false|auto) "auto"> <!ATTLIST one-to-one constrained (true|false) "false"> ! <!-- A property embedded in a composite identifier or map index (always not-null). --> ! <!ELEMENT key-property (column*)> <!ATTLIST key-property name CDATA #REQUIRED> *************** *** 156,170 **** <!ATTLIST key-property column CDATA #IMPLIED> <!ATTLIST key-property length CDATA #IMPLIED> ! <!-- A many-to-one association embedded in a composite identifier or map index (always not-null, never cascade). --> ! <!ELEMENT key-many-to-one (column*)> <!ATTLIST key-many-to-one name CDATA #REQUIRED> <!ATTLIST key-many-to-one class CDATA #IMPLIED> <!ATTLIST key-many-to-one column CDATA #IMPLIED> ! <!-- Declared a property that holds instances of a toplevel collection role. --> ! <!ELEMENT collection (column*)> <!ATTLIST collection name CDATA #REQUIRED> --- 155,169 ---- <!ATTLIST key-property column CDATA #IMPLIED> <!ATTLIST key-property length CDATA #IMPLIED> ! <!-- A many-to-one association embedded in a composite identifier or map index (always not-null, never cascade). --> ! <!ELEMENT key-many-to-one (column*)> <!ATTLIST key-many-to-one name CDATA #REQUIRED> <!ATTLIST key-many-to-one class CDATA #IMPLIED> <!ATTLIST key-many-to-one column CDATA #IMPLIED> ! <!-- Declared a property that holds instances of a toplevel collection role. --> ! <!ELEMENT collection (column*)> <!ATTLIST collection name CDATA #REQUIRED> *************** *** 175,179 **** <!ATTLIST collection unique (true|false) "false"> <!ATTLIST collection cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> ! <!-- A component is a user-defined class, persisted along with its containing entity to the table of the entity class. JavaBeans style properties of the component are --- 174,178 ---- <!ATTLIST collection unique (true|false) "false"> <!ATTLIST collection cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> ! <!-- A component is a user-defined class, persisted along with its containing entity to the table of the entity class. JavaBeans style properties of the component are *************** *** 181,185 **** is mapped to null values in all columns and vice versa. Components do not support shared reference semantics. --> ! <!ELEMENT component ( parent?, --- 180,184 ---- is mapped to null values in all columns and vice versa. Components do not support shared reference semantics. --> ! <!ELEMENT component ( parent?, *************** *** 188,198 **** <!ATTLIST component class CDATA #IMPLIED> <!ATTLIST component name CDATA #REQUIRED> ! <!-- The parent element maps a property of the component class as a pointer back to the owning entity. --> ! <!ELEMENT parent EMPTY> <!ATTLIST parent name CDATA #REQUIRED> ! <!-- Collection roles declared directly beneath the root element have their own key and may be referenced by many collection or subcollection tags. Collection declarations --- 187,197 ---- <!ATTLIST component class CDATA #IMPLIED> <!ATTLIST component name CDATA #REQUIRED> ! <!-- The parent element maps a property of the component class as a pointer back to the owning entity. --> ! <!ELEMENT parent EMPTY> <!ATTLIST parent name CDATA #REQUIRED> ! <!-- Collection roles declared directly beneath the root element have their own key and may be referenced by many collection or subcollection tags. Collection declarations *************** *** 201,207 **** the role may be an arbitrary string. For nested collections, it must be the name of the property containing the collection. ! Note that the cascade attribute is ignored for toplevel collections. --> ! <!ELEMENT map ( jcs-cache?, --- 200,206 ---- the role may be an arbitrary string. For nested collections, it must be the name of the property containing the collection. ! Note that the cascade attribute is ignored for toplevel collections. --> ! <!ELEMENT map ( jcs-cache?, *************** *** 217,221 **** <!ATTLIST map cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> <!ATTLIST map order-by CDATA #IMPLIED> <!-- default: none --> ! <!ELEMENT set ( jcs-cache?, --- 216,220 ---- <!ATTLIST map cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> <!ATTLIST map order-by CDATA #IMPLIED> <!-- default: none --> ! <!ELEMENT set ( jcs-cache?, *************** *** 231,235 **** <!ATTLIST set cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> <!ATTLIST set order-by CDATA #IMPLIED> <!-- default: none --> ! <!ELEMENT bag ( jcs-cache?, --- 230,234 ---- <!ATTLIST set cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> <!ATTLIST set order-by CDATA #IMPLIED> <!-- default: none --> ! <!ELEMENT bag ( jcs-cache?, *************** *** 244,248 **** <!ATTLIST bag cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> <!ATTLIST bag order-by CDATA #IMPLIED> <!-- default: none --> ! <!ELEMENT list ( jcs-cache?, --- 243,247 ---- <!ATTLIST bag cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> <!ATTLIST bag order-by CDATA #IMPLIED> <!-- default: none --> ! <!ELEMENT list ( jcs-cache?, *************** *** 256,260 **** <!ATTLIST list lazy (true|false) "false"> <!ATTLIST list cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> ! <!ELEMENT array ( jcs-cache?, --- 255,259 ---- <!ATTLIST list lazy (true|false) "false"> <!ATTLIST list cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> ! <!ELEMENT array ( jcs-cache?, *************** *** 268,279 **** <!ATTLIST array element-class CDATA #IMPLIED> <!ATTLIST array cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> ! <!ELEMENT primitive-array (jcs-cache?, key, index, element)> <!ATTLIST primitive-array role CDATA #REQUIRED> <!ATTLIST primitive-array table CDATA #IMPLIED> <!-- default: rolename --> <!ATTLIST primitive-array schema CDATA #IMPLIED> <!-- default: none --> ! <!-- Declares the element type of a collection of basic type --> ! <!ELEMENT element (column*)> <!ATTLIST element column CDATA #IMPLIED> --- 267,278 ---- <!ATTLIST array element-class CDATA #IMPLIED> <!ATTLIST array cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> ! <!ELEMENT primitive-array (jcs-cache?, key, index, element)> <!ATTLIST primitive-array role CDATA #REQUIRED> <!ATTLIST primitive-array table CDATA #IMPLIED> <!-- default: rolename --> <!ATTLIST primitive-array schema CDATA #IMPLIED> <!-- default: none --> ! <!-- Declares the element type of a collection of basic type --> ! <!ELEMENT element (column*)> <!ATTLIST element column CDATA #IMPLIED> *************** *** 282,297 **** <!ATTLIST element not-null (true|false) "false"> <!ATTLIST element unique (true|false) "false"> ! <!-- One to many association. This tag declares the entity-class element type of a collection and specifies a one-to-many relational model --> ! <!ELEMENT one-to-many EMPTY> <!ATTLIST one-to-many class CDATA #REQUIRED> <!-- No column declaration attributes required in this case. The primary key column of the associated class is already mapped elsewhere.--> ! <!-- Many to many association. This tag declares the entity-class element type of a collection and specifies a many-to-many relational model --> ! <!ELEMENT many-to-many (column*)> <!ATTLIST many-to-many class CDATA #REQUIRED> --- 281,296 ---- <!ATTLIST element not-null (true|false) "false"> <!ATTLIST element unique (true|false) "false"> ! <!-- One to many association. This tag declares the entity-class element type of a collection and specifies a one-to-many relational model --> ! <!ELEMENT one-to-many EMPTY> <!ATTLIST one-to-many class CDATA #REQUIRED> <!-- No column declaration attributes required in this case. The primary key column of the associated class is already mapped elsewhere.--> ! <!-- Many to many association. This tag declares the entity-class element type of a collection and specifies a many-to-many relational model --> ! <!ELEMENT many-to-many (column*)> <!ATTLIST many-to-many class CDATA #REQUIRED> *************** *** 300,307 **** <!ATTLIST many-to-many outer-join (true|false|auto) "auto"> <!-- unique makes no sense here since it would make the association one-to-many --> ! <!-- This tag declares that the element type of a collection is a named toplevel collection role. --> ! <!ELEMENT subcollection (column*)> <!ATTLIST subcollection column CDATA #IMPLIED> --- 299,306 ---- <!ATTLIST many-to-many outer-join (true|false|auto) "auto"> <!-- unique makes no sense here since it would make the association one-to-many --> ! <!-- This tag declares that the element type of a collection is a named toplevel collection role. --> ! <!ELEMENT subcollection (column*)> <!ATTLIST subcollection column CDATA #IMPLIED> *************** *** 310,324 **** <!ATTLIST subcollection not-null (true|false) "false"> <!ATTLIST subcollection unique (true|false) "false"> ! <!-- A composite element allows a collection to hold instances of an arbitrary class, without the requirement of joining to an entity table. Composite elements have component semantics - no shared references and ad hoc null value semantics. Composite elements may not hold nested collections. --> ! <!ELEMENT composite-element ( (property|many-to-one|collection|nested-composite-element)* )> <!ATTLIST composite-element class CDATA #REQUIRED> ! <!ELEMENT nested-composite-element ( (property|many-to-one|collection|nested-composite-element)* --- 309,323 ---- <!ATTLIST subcollection not-null (true|false) "false"> <!ATTLIST subcollection unique (true|false) "false"> ! <!-- A composite element allows a collection to hold instances of an arbitrary class, without the requirement of joining to an entity table. Composite elements have component semantics - no shared references and ad hoc null value semantics. Composite elements may not hold nested collections. --> ! <!ELEMENT composite-element ( (property|many-to-one|collection|nested-composite-element)* )> <!ATTLIST composite-element class CDATA #REQUIRED> ! <!ELEMENT nested-composite-element ( (property|many-to-one|collection|nested-composite-element)* *************** *** 326,374 **** <!ATTLIST nested-composite-element class CDATA #REQUIRED> <!ATTLIST nested-composite-element name CDATA #REQUIRED> ! <!-- Declares the type, column name (and, in the case of toplevel collections, an id generation strategy) for the key of a collection table. These keys are never exposed to the application. For toplevel collections, Hibernate makes no guarantee of key stability of a particular collection instance. --> ! <!ELEMENT key (column*)> <!ATTLIST key column CDATA #IMPLIED> <!ATTLIST key length CDATA #IMPLIED> ! <!ELEMENT generated-key (generator, column*)> <!ATTLIST generated-key column CDATA #IMPLIED> <!ATTLIST generated-key type CDATA #REQUIRED> <!ATTLIST generated-key length CDATA #IMPLIED> ! <!-- Declares the type and column mapping for a collection index (array or list index, or key of a map). --> ! <!ELEMENT index (column*)> <!ATTLIST index column CDATA #IMPLIED> <!ATTLIST index type CDATA #IMPLIED> <!-- required for maps --> <!ATTLIST index length CDATA #IMPLIED> ! <!-- Many to many association mapped to the key of a map. ie. a map keyed on entities. --> ! <!ELEMENT index-many-to-many (column*)> <!ATTLIST index-many-to-many class CDATA #REQUIRED> <!ATTLIST index-many-to-many column CDATA #IMPLIED> ! <!-- Composite index of a map ie. a map keyed on components. --> ! <!ELEMENT composite-index ( (key-property|key-many-to-one)+ )> <!ATTLIST composite-index class CDATA #REQUIRED> ! <!-- Generators generate unique identifiers. The class attribute specifies a Java class implementing an id generation algorithm. --> ! <!ELEMENT generator (param*)> <!ATTLIST generator class CDATA #REQUIRED> <!ELEMENT param (#PCDATA)> ! <!-- The column element is an alternative to column attributes and required for mapping associations to classes with composite ids. --> ! <!ELEMENT column EMPTY> <!ATTLIST column name CDATA #REQUIRED> --- 325,373 ---- <!ATTLIST nested-composite-element class CDATA #REQUIRED> <!ATTLIST nested-composite-element name CDATA #REQUIRED> ! <!-- Declares the type, column name (and, in the case of toplevel collections, an id generation strategy) for the key of a collection table. These keys are never exposed to the application. For toplevel collections, Hibernate makes no guarantee of key stability of a particular collection instance. --> ! <!ELEMENT key (column*)> <!ATTLIST key column CDATA #IMPLIED> <!ATTLIST key length CDATA #IMPLIED> ! <!ELEMENT generated-key (generator, column*)> <!ATTLIST generated-key column CDATA #IMPLIED> <!ATTLIST generated-key type CDATA #REQUIRED> <!ATTLIST generated-key length CDATA #IMPLIED> ! <!-- Declares the type and column mapping for a collection index (array or list index, or key of a map). --> ! <!ELEMENT index (column*)> <!ATTLIST index column CDATA #IMPLIED> <!ATTLIST index type CDATA #IMPLIED> <!-- required for maps --> <!ATTLIST index length CDATA #IMPLIED> ! <!-- Many to many association mapped to the key of a map. ie. a map keyed on entities. --> ! <!ELEMENT index-many-to-many (column*)> <!ATTLIST index-many-to-many class CDATA #REQUIRED> <!ATTLIST index-many-to-many column CDATA #IMPLIED> ! <!-- Composite index of a map ie. a map keyed on components. --> ! <!ELEMENT composite-index ( (key-property|key-many-to-one)+ )> <!ATTLIST composite-index class CDATA #REQUIRED> ! <!-- Generators generate unique identifiers. The class attribute specifies a Java class implementing an id generation algorithm. --> ! <!ELEMENT generator (param*)> <!ATTLIST generator class CDATA #REQUIRED> <!ELEMENT param (#PCDATA)> ! <!-- The column element is an alternative to column attributes and required for mapping associations to classes with composite ids. --> ! <!ELEMENT column EMPTY> <!ATTLIST column name CDATA #REQUIRED> *************** *** 378,390 **** <!ATTLIST column sql-type CDATA #IMPLIED> <!-- override default column type for hibernate type --> <!ATTLIST column index CDATA #IMPLIED> ! <!-- The jcs-cache element enables caching of an entity class. --> <!ELEMENT jcs-cache EMPTY> <!ATTLIST jcs-cache usage (read-only|read-write) #REQUIRED> ! <!-- The query element declares a named Hibernate query string --> ! <!ELEMENT query (#PCDATA)> <!ATTLIST query name CDATA #REQUIRED> ! #---PASS-HTML <A href=http://sourceforge.net/projects/hibernate><IMG src=http://sourceforge.net/sflogo.php?group_id=40712></A> --- 377,389 ---- <!ATTLIST column sql-type CDATA #IMPLIED> <!-- override default column type for hibernate type --> <!ATTLIST column index CDATA #IMPLIED> ! <!-- The jcs-cache element enables caching of an entity class. --> <!ELEMENT jcs-cache EMPTY> <!ATTLIST jcs-cache usage (read-only|read-write) #REQUIRED> ! <!-- The query element declares a named Hibernate query string --> ! <!ELEMENT query (#PCDATA)> <!ATTLIST query name CDATA #REQUIRED> ! #---PASS-HTML <A href=http://sourceforge.net/projects/hibernate><IMG src=http://sourceforge.net/sflogo.php?group_id=40712></A> Index: dtd.html =================================================================== RCS file: /cvsroot/hibernate/Hibernate/doc/dtd.html,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** dtd.html 11 Nov 2002 16:04:55 -0000 1.22 --- dtd.html 20 Nov 2002 14:55:46 -0000 1.23 *************** *** 19,29 **** <pre> <?xml version='1.0' encoding='utf-8'?> ! <!-- Hibernate Mapping DTD. ! <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 1.1//EN" "http://hibernate.sourceforge.net/hibernate-mapping-1.1.dtd"> ! An instance of this XML document may contain mappings for an arbitrary number of classes. The class mappings may contain associations to classes --- 19,32 ---- <pre> <?xml version='1.0' encoding='utf-8'?> ! </pre> ! <pre> <!-- Hibernate Mapping DTD. ! </pre> ! <pre> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 1.1//EN" "http://hibernate.sourceforge.net/hibernate-mapping-1.1.dtd"> ! </pre> ! <pre> An instance of this XML document may contain mappings for an arbitrary number of classes. The class mappings may contain associations to classes *************** *** 33,41 **** be referenced by later class and collection mappings in the same document. (They must be declared before they are used.) ! --> ! <!-- The document root. --> ! <!ELEMENT hibernate-mapping ( (map|set|list|bag|array|primitive-array)*, --- 36,47 ---- be referenced by later class and collection mappings in the same document. (They must be declared before they are used.) ! </pre> ! <pre> --> ! </pre> ! <pre> <!-- The document root. --> ! </pre> ! <pre> <!ELEMENT hibernate-mapping ( (map|set|list|bag|array|primitive-array)*, *************** *** 45,51 **** <!ATTLIST hibernate-mapping schema CDATA #IMPLIED> <!-- default: none --> <!ATTLIST hibernate-mapping default-cascade (none|save-update|all) "none"> ! <!-- Root of an entity class hierarchy. Entities have their own tables. --> ! <!ELEMENT class ( jcs-cache?, --- 51,59 ---- <!ATTLIST hibernate-mapping schema CDATA #IMPLIED> <!-- default: none --> <!ATTLIST hibernate-mapping default-cascade (none|save-update|all) "none"> ! </pre> ! <pre> <!-- Root of an entity class hierarchy. Entities have their own tables. --> ! </pre> ! <pre> <!ELEMENT class ( jcs-cache?, *************** *** 54,74 **** (version|timestamp)?, (property|many-to-one|one-to-one|collection|component|map|set|list|bag|array|primitive-array)*, ! ((subclass*)|(joined-subclass*)), ! cache? )> <!ATTLIST class name CDATA #REQUIRED> ! <!ATTLIST class table CDATA #IMPLIED> <!-- default: unqualified classname --> ! <!ATTLIST class schema CDATA #IMPLIED> <!-- default: none --> ! <!ATTLIST class proxy CDATA #IMPLIED> <!-- default: no proxy interface --> <!ATTLIST class mutable (true|false) "true"> ! <!ATTLIST class persister CDATA #IMPLIED> <!-- default: cirrus.hibernate.persister.EntityPersister --> ! ! <!ATTLIST class discriminator-value CDATA #IMPLIED> <!-- default: unqualified class name | none --> ! <!-- Declares the id type, column and generation algorithm for an entity class. If a name attribut is given, the id is exposed to the application through the named property of the class. If not, the id is only exposed to the application through Session.getID()--> ! <!ELEMENT id (column?, generator)> <!ATTLIST id name CDATA #IMPLIED> --- 62,83 ---- (version|timestamp)?, (property|many-to-one|one-to-one|collection|component|map|set|list|bag|array|primitive-array)*, ! ((subclass*)|(joined-subclass*)) )> <!ATTLIST class name CDATA #REQUIRED> ! <!ATTLIST class table CDATA #IMPLIED> <!-- default: unqualified classname --> ! <!ATTLIST class schema CDATA #IMPLIED> <!-- default: none --> ! <!ATTLIST class proxy CDATA #IMPLIED> <!-- default: no proxy interface --> ! <!ATTLIST class discriminator-value CDATA #IMPLIED> <!-- default: unqualified class name | none --> <!ATTLIST class mutable (true|false) "true"> ! <!ATTLIST class polymorphism (implicit|explicit) "implicit"> ! <!ATTLIST class persister CDATA #IMPLIED> ! </pre> ! <pre> <!-- Declares the id type, column and generation algorithm for an entity class. If a name attribut is given, the id is exposed to the application through the named property of the class. If not, the id is only exposed to the application through Session.getID()--> ! </pre> ! <pre> <!ELEMENT id (column?, generator)> <!ATTLIST id name CDATA #IMPLIED> *************** *** 77,113 **** <!ATTLIST id length CDATA #IMPLIED> <!ATTLIST id unsaved-value CDATA "any"> <!-- any|none|null|"value" --> ! <!-- A composite key may be modelled by a java class with a property for each key column. The class must implement java.io.Serializable and reimplement equals() and hashCode(). --> ! <!ELEMENT composite-id ( (key-property|key-many-to-one)+ )> <!ATTLIST composite-id class CDATA #IMPLIED> <!ATTLIST composite-id name CDATA #IMPLIED> <!ATTLIST composite-id unsaved-value (any|none|null) "any"> <!-- default: any --> ! <!-- Polymorphic data requires a column holding a class discriminator value. This value is not directly exposed to the application. --> ! <!ELEMENT discriminator (column?)> <!ATTLIST discriminator column CDATA #IMPLIED> <!-- default: "class"|none --> <!ATTLIST discriminator type CDATA "string"> <!ATTLIST discriminator length CDATA #IMPLIED> ! <!-- Versioned data requires a column holding a version number. This is exposed to the application through a property of the Java class. --> ! <!ELEMENT version EMPTY> <!ATTLIST version name CDATA #REQUIRED> <!ATTLIST version column CDATA #IMPLIED> <!ATTLIST version type CDATA "integer"> ! <!ELEMENT timestamp EMPTY> <!ATTLIST timestamp name CDATA #REQUIRED> <!ATTLIST timestamp column CDATA #IMPLIED> ! <!-- Subclass declarations are nested beneath the root class declaration to achieve polymorphic persistence. --> ! <!ELEMENT subclass ( (property|many-to-one|one-to-one|collection|component|map|set|list|bag|array|primitive-array)*, --- 86,131 ---- <!ATTLIST id length CDATA #IMPLIED> <!ATTLIST id unsaved-value CDATA "any"> <!-- any|none|null|"value" --> ! </pre> ! <pre> <!-- A composite key may be modelled by a java class with a property for each key column. The class must implement java.io.Serializable and reimplement equals() and hashCode(). --> ! </pre> ! <pre> <!ELEMENT composite-id ( (key-property|key-many-to-one)+ )> <!ATTLIST composite-id class CDATA #IMPLIED> <!ATTLIST composite-id name CDATA #IMPLIED> <!ATTLIST composite-id unsaved-value (any|none|null) "any"> <!-- default: any --> ! </pre> ! <pre> <!-- Polymorphic data requires a column holding a class discriminator value. This value is not directly exposed to the application. --> ! </pre> ! <pre> <!ELEMENT discriminator (column?)> <!ATTLIST discriminator column CDATA #IMPLIED> <!-- default: "class"|none --> <!ATTLIST discriminator type CDATA "string"> <!ATTLIST discriminator length CDATA #IMPLIED> ! </pre> ! <pre> <!-- Versioned data requires a column holding a version number. This is exposed to the application through a property of the Java class. --> ! </pre> ! <pre> <!ELEMENT version EMPTY> <!ATTLIST version name CDATA #REQUIRED> <!ATTLIST version column CDATA #IMPLIED> <!ATTLIST version type CDATA "integer"> ! </pre> ! <pre> <!ELEMENT timestamp EMPTY> <!ATTLIST timestamp name CDATA #REQUIRED> <!ATTLIST timestamp column CDATA #IMPLIED> ! </pre> ! <pre> <!-- Subclass declarations are nested beneath the root class declaration to achieve polymorphic persistence. --> ! </pre> ! <pre> <!ELEMENT subclass ( (property|many-to-one|one-to-one|collection|component|map|set|list|bag|array|primitive-array)*, *************** *** 117,123 **** <!ATTLIST subclass proxy CDATA #IMPLIED> <!-- default: no proxy interface --> <!ATTLIST subclass discriminator-value CDATA #IMPLIED> <!-- default: unqualified class name | none --> ! <!-- Joined subclasses are used for the normalized table-per-subclass mapping strategy --> ! <!ELEMENT joined-subclass ( key, --- 135,143 ---- <!ATTLIST subclass proxy CDATA #IMPLIED> <!-- default: no proxy interface --> <!ATTLIST subclass discriminator-value CDATA #IMPLIED> <!-- default: unqualified class name | none --> ! </pre> ! <pre> <!-- Joined subclasses are used for the normalized table-per-subclass mapping strategy --> ! </pre> ! <pre> <!ELEMENT joined-subclass ( key, *************** *** 129,136 **** <!ATTLIST joined-subclass table CDATA #REQUIRED> <!ATTLIST joined-subclass schema CDATA #IMPLIED> ! <!-- Property of an entity class or component, component-element, composite-id, etc. JavaBeans style properties are mapped to table columns. --> ! <!ELEMENT property (column*)> <!ATTLIST property name CDATA #REQUIRED> --- 149,158 ---- <!ATTLIST joined-subclass table CDATA #REQUIRED> <!ATTLIST joined-subclass schema CDATA #IMPLIED> ! </pre> ! <pre> <!-- Property of an entity class or component, component-element, composite-id, etc. JavaBeans style properties are mapped to table columns. --> ! </pre> ! <pre> <!ELEMENT property (column*)> <!ATTLIST property name CDATA #REQUIRED> *************** *** 140,147 **** <!ATTLIST property not-null (true|false) "false"> <!ATTLIST property unique (true|false) "false"> ! <!-- Declares an association between two entities (Or from a component, component element, etc. to an entity). --> ! <!ELEMENT many-to-one (column*)> <!ATTLIST many-to-one name CDATA #REQUIRED> --- 162,171 ---- <!ATTLIST property not-null (true|false) "false"> <!ATTLIST property unique (true|false) "false"> ! </pre> ! <pre> <!-- Declares an association between two entities (Or from a component, component element, etc. to an entity). --> ! </pre> ! <pre> <!ELEMENT many-to-one (column*)> <!ATTLIST many-to-one name CDATA #REQUIRED> *************** *** 152,159 **** <!ATTLIST many-to-one cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> <!ATTLIST many-to-one outer-join (true|false|auto) "auto"> ! <!-- Declares a one-to-one association between two entities (Or from a component, component element, etc. to an entity). --> ! <!ELEMENT one-to-one EMPTY> <!ATTLIST one-to-one name CDATA #REQUIRED> --- 176,185 ---- <!ATTLIST many-to-one cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> <!ATTLIST many-to-one outer-join (true|false|auto) "auto"> ! </pre> ! <pre> <!-- Declares a one-to-one association between two entities (Or from a component, component element, etc. to an entity). --> ! </pre> ! <pre> <!ELEMENT one-to-one EMPTY> <!ATTLIST one-to-one name CDATA #REQUIRED> *************** *** 162,168 **** <!ATTLIST one-to-one outer-join (true|false|auto) "auto"> <!ATTLIST one-to-one constrained (true|false) "false"> ! <!-- A property embedded in a composite identifier or map index (always not-null). --> ! <!ELEMENT key-property (column*)> <!ATTLIST key-property name CDATA #REQUIRED> --- 188,196 ---- <!ATTLIST one-to-one outer-join (true|false|auto) "auto"> <!ATTLIST one-to-one constrained (true|false) "false"> ! </pre> ! <pre> <!-- A property embedded in a composite identifier or map index (always not-null). --> ! </pre> ! <pre> <!ELEMENT key-property (column*)> <!ATTLIST key-property name CDATA #REQUIRED> *************** *** 170,184 **** <!ATTLIST key-property column CDATA #IMPLIED> <!ATTLIST key-property length CDATA #IMPLIED> ! <!-- A many-to-one association embedded in a composite identifier or map index (always not-null, never cascade). --> ! <!ELEMENT key-many-to-one (column*)> <!ATTLIST key-many-to-one name CDATA #REQUIRED> <!ATTLIST key-many-to-one class CDATA #IMPLIED> <!ATTLIST key-many-to-one column CDATA #IMPLIED> ! <!-- Declared a property that holds instances of a toplevel collection role. --> ! <!ELEMENT collection (column*)> <!ATTLIST collection name CDATA #REQUIRED> --- 198,216 ---- <!ATTLIST key-property column CDATA #IMPLIED> <!ATTLIST key-property length CDATA #IMPLIED> ! </pre> ! <pre> <!-- A many-to-one association embedded in a composite identifier or map index (always not-null, never cascade). --> ! </pre> ! <pre> <!ELEMENT key-many-to-one (column*)> <!ATTLIST key-many-to-one name CDATA #REQUIRED> <!ATTLIST key-many-to-one class CDATA #IMPLIED> <!ATTLIST key-many-to-one column CDATA #IMPLIED> ! </pre> ! <pre> <!-- Declared a property that holds instances of a toplevel collection role. --> ! </pre> ! <pre> <!ELEMENT collection (column*)> <!ATTLIST collection name CDATA #REQUIRED> *************** *** 189,193 **** <!ATTLIST collection unique (true|false) "false"> <!ATTLIST collection cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> ! <!-- A component is a user-defined class, persisted along with its containing entity to the table of the entity class. JavaBeans style properties of the component are --- 221,226 ---- <!ATTLIST collection unique (true|false) "false"> <!ATTLIST collection cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> ! </pre> ! <pre> <!-- A component is a user-defined class, persisted along with its containing entity to the table of the entity class. JavaBeans style properties of the component are *************** *** 195,199 **** is mapped to null values in all columns and vice versa. Components do not support shared reference semantics. --> ! <!ELEMENT component ( parent?, --- 228,233 ---- is mapped to null values in all columns and vice versa. Components do not support shared reference semantics. --> ! </pre> ! <pre> <!ELEMENT component ( parent?, *************** *** 202,212 **** <!ATTLIST component class CDATA #IMPLIED> <!ATTLIST component name CDATA #REQUIRED> ! <!-- The parent element maps a property of the component class as a pointer back to the owning entity. --> ! <!ELEMENT parent EMPTY> <!ATTLIST parent name CDATA #REQUIRED> ! <!-- Collection roles declared directly beneath the root element have their own key and may be referenced by many collection or subcollection tags. Collection declarations --- 236,249 ---- <!ATTLIST component class CDATA #IMPLIED> <!ATTLIST component name CDATA #REQUIRED> ! </pre> ! <pre> <!-- The parent element maps a property of the component class as a pointer back to the owning entity. --> ! </pre> ! <pre> <!ELEMENT parent EMPTY> <!ATTLIST parent name CDATA #REQUIRED> ! </pre> ! <pre> <!-- Collection roles declared directly beneath the root element have their own key and may be referenced by many collection or subcollection tags. Collection declarations *************** *** 215,221 **** the role may be an arbitrary string. For nested collections, it must be the name of the property containing the collection. ! Note that the cascade attribute is ignored for toplevel collections. --> ! <!ELEMENT map ( jcs-cache?, --- 252,260 ---- the role may be an arbitrary string. For nested collections, it must be the name of the property containing the collection. ! </pre> ! <pre> Note that the cascade attribute is ignored for toplevel collections. --> ! </pre> ! <pre> <!ELEMENT map ( jcs-cache?, *************** *** 231,235 **** <!ATTLIST map cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> <!ATTLIST map order-by CDATA #IMPLIED> <!-- default: none --> ! <!ELEMENT set ( jcs-cache?, --- 270,275 ---- <!ATTLIST map cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> <!ATTLIST map order-by CDATA #IMPLIED> <!-- default: none --> ! </pre> ! <pre> <!ELEMENT set ( jcs-cache?, *************** *** 245,249 **** <!ATTLIST set cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> <!ATTLIST set order-by CDATA #IMPLIED> <!-- default: none --> ! <!ELEMENT bag ( jcs-cache?, --- 285,290 ---- <!ATTLIST set cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> <!ATTLIST set order-by CDATA #IMPLIED> <!-- default: none --> ! </pre> ! <pre> <!ELEMENT bag ( jcs-cache?, *************** *** 258,262 **** <!ATTLIST bag cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> <!ATTLIST bag order-by CDATA #IMPLIED> <!-- default: none --> ! <!ELEMENT list ( jcs-cache?, --- 299,304 ---- <!ATTLIST bag cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> <!ATTLIST bag order-by CDATA #IMPLIED> <!-- default: none --> ! </pre> ! <pre> <!ELEMENT list ( jcs-cache?, *************** *** 270,274 **** <!ATTLIST list lazy (true|false) "false"> <!ATTLIST list cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> ! <!ELEMENT array ( jcs-cache?, --- 312,317 ---- <!ATTLIST list lazy (true|false) "false"> <!ATTLIST list cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> ! </pre> ! <pre> <!ELEMENT array ( jcs-cache?, *************** *** 282,293 **** <!ATTLIST array element-class CDATA #IMPLIED> <!ATTLIST array cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> ! <!ELEMENT primitive-array (jcs-cache?, key, index, element)> <!ATTLIST primitive-array role CDATA #REQUIRED> <!ATTLIST primitive-array table CDATA #IMPLIED> <!-- default: rolename --> <!ATTLIST primitive-array schema CDATA #IMPLIED> <!-- default: none --> ! <!-- Declares the element type of a collection of basic type --> ! <!ELEMENT element (column*)> <!ATTLIST element column CDATA #IMPLIED> --- 325,339 ---- <!ATTLIST array element-class CDATA #IMPLIED> <!ATTLIST array cascade (none|all|save-update|delete) #IMPLIED> <!-- default: none --> ! </pre> ! <pre> <!ELEMENT primitive-array (jcs-cache?, key, index, element)> <!ATTLIST primitive-array role CDATA #REQUIRED> <!ATTLIST primitive-array table CDATA #IMPLIED> <!-- default: rolename --> <!ATTLIST primitive-array schema CDATA #IMPLIED> <!-- default: none --> ! </pre> ! <pre> <!-- Declares the element type of a collection of basic type --> ! </pre> ! <pre> <!ELEMENT element (column*)> <!ATTLIST element column CDATA #IMPLIED> *************** *** 296,311 **** <!ATTLIST element not-null (true|false) "false"> <!ATTLIST element unique (true|false) "false"> ! <!-- One to many association. This tag declares the entity-class element type of a collection and specifies a one-to-many relational model --> ! <!ELEMENT one-to-many EMPTY> <!ATTLIST one-to-many class CDATA #REQUIRED> <!-- No column declaration attributes required in this case. The primary key column of the associated class is already mapped elsewhere.--> ! <!-- Many to many association. This tag declares the entity-class element type of a collection and specifies a many-to-many relational model --> ! <!ELEMENT many-to-many (column*)> <!ATTLIST many-to-many class CDATA #REQUIRED> --- 342,361 ---- <!ATTLIST element not-null (true|false) "false"> <!ATTLIST element unique (true|false) "false"> ! </pre> ! <pre> <!-- One to many association. This tag declares the entity-class element type of a collection and specifies a one-to-many relational model --> ! </pre> ! <pre> <!ELEMENT one-to-many EMPTY> <!ATTLIST one-to-many class CDATA #REQUIRED> <!-- No column declaration attributes required in this case. The primary key column of the associated class is already mapped elsewhere.--> ! </pre> ! <pre> <!-- Many to many association. This tag declares the entity-class element type of a collection and specifies a many-to-many relational model --> ! </pre> ! <pre> <!ELEMENT many-to-many (column*)> <!ATTLIST many-to-many class CDATA #REQUIRED> *************** *** 314,321 **** <!ATTLIST many-to-many outer-join (true|false|auto) "auto"> <!-- unique makes no sense here since it would make the association one-to-many --> ! <!-- This tag declares that the element type of a collection is a named toplevel collection role. --> ! <!ELEMENT subcollection (column*)> <!ATTLIST subcollection column CDATA #IMPLIED> --- 364,373 ---- <!ATTLIST many-to-many outer-join (true|false|auto) "auto"> <!-- unique makes no sense here since it would make the association one-to-many --> ! </pre> ! <pre> <!-- This tag declares that the element type of a collection is a named toplevel collection role. --> ! </pre> ! <pre> <!ELEMENT subcollection (column*)> <!ATTLIST subcollection column CDATA #IMPLIED> *************** *** 324,338 **** <!ATTLIST subcollection not-null (true|false) "false"> <!ATTLIST subcollection unique (true|false) "false"> ! <!-- A composite element allows a collection to hold instances of an arbitrary class, without the requirement of joining to an entity table. Composite elements have component semantics - no shared references and ad hoc null value semantics. Composite elements may not hold nested collections. --> ! <!ELEMENT composite-element ( (property|many-to-one|collection|nested-composite-element)* )> <!ATTLIST composite-element class CDATA #REQUIRED> ! <!ELEMENT nested-composite-element ( (property|many-to-one|collection|nested-composite-element)* --- 376,393 ---- <!ATTLIST subcollection not-null (true|false) "false"> <!ATTLIST subcollection unique (true|false) "false"> ! </pre> ! <pre> <!-- A composite element allows a collection to hold instances of an arbitrary class, without the requirement of joining to an entity table. Composite elements have component semantics - no shared references and ad hoc null value semantics. Composite elements may not hold nested collections. --> ! </pre> ! <pre> <!ELEMENT composite-element ( (property|many-to-one|collection|nested-composite-element)* )> <!ATTLIST composite-element class CDATA #REQUIRED> ! </pre> ! <pre> <!ELEMENT nested-composite-element ( (property|many-to-one|collection|nested-composite-element)* *************** *** 340,388 **** <!ATTLIST nested-composite-element class CDATA #REQUIRED> <!ATTLIST nested-composite-element name CDATA #REQUIRED> ! <!-- Declares the type, column name (and, in the case of toplevel collections, an id generation strategy) for the key of a collection table. These keys are never exposed to the application. For toplevel collections, Hibernate makes no guarantee of key stability of a particular collection instance. --> ! <!ELEMENT key (column*)> <!ATTLIST key column CDATA #IMPLIED> <!ATTLIST key length CDATA #IMPLIED> ! <!ELEMENT generated-key (generator, column*)> <!ATTLIST generated-key column CDATA #IMPLIED> <!ATTLIST generated-key type CDATA #REQUIRED> <!ATTLIST generated-key length CDATA #IMPLIED> ! <!-- Declares the type and column mapping for a collection index (array or list index, or key of a map). --> ! <!ELEMENT index (column*)> <!ATTLIST index column CDATA #IMPLIED> <!ATTLIST index type CDATA #IMPLIED> <!-- required for maps --> <!ATTLIST index length CDATA #IMPLIED> ! <!-- Many to many association mapped to the key of a map. ie. a map keyed on entities. --> ! <!ELEMENT index-many-to-many (column*)> <!ATTLIST index-many-to-many class CDATA #REQUIRED> <!ATTLIST index-many-to-many column CDATA #IMPLIED> ! <!-- Composite index of a map ie. a map keyed on components. --> ! <!ELEMENT composite-index ( (key-property|key-many-to-one)+ )> <!ATTLIST composite-index class CDATA #REQUIRED> ! <!-- Generators generate unique identifiers. The class attribute specifies a Java class implementing an id generation algorithm. --> ! <!ELEMENT generator (param*)> <!ATTLIST generator class CDATA #REQUIRED> <!ELEMENT param (#PCDATA)> ! <!-- The column element is an alternative to column attributes and required for mapping associations to classes with composite ids. --> ! <!ELEMENT column EMPTY> <!ATTLIST column name CDATA #REQUIRED> --- 395,456 ---- <!ATTLIST nested-composite-element class CDATA #REQUIRED> <!ATTLIST nested-composite-element name CDATA #REQUIRED> ! </pre> ! <pre> <!-- Declares the type, column name (and, in the case of toplevel collections, an id generation strategy) for the key of a collection table. These keys are never exposed to the application. For toplevel collections, Hibernate makes no guarantee of key stability of a particular collection instance. --> ! </pre> ! <pre> <!ELEMENT key (column*)> <!ATTLIST key column CDATA #IMPLIED> <!ATTLIST key length CDATA #IMPLIED> ! </pre> ! <pre> <!ELEMENT generated-key (generator, column*)> <!ATTLIST generated-key column CDATA #IMPLIED> <!ATTLIST generated-key type CDATA #REQUIRED> <!ATTLIST generated-key length CDATA #IMPLIED> ! </pre> ! <pre> <!-- Declares the type and column mapping for a collection index (array or list index, or key of a map). --> ! </pre> ! <pre> <!ELEMENT index (column*)> <!ATTLIST index column CDATA #IMPLIED> <!ATTLIST index type CDATA #IMPLIED> <!-- required for maps --> <!ATTLIST index length CDATA #IMPLIED> ! </pre> ! <pre> <!-- Many to many association mapped to the key of a map. ie. a map keyed on entities. --> ! </pre> ! <pre> <!ELEMENT index-many-to-many (column*)> <!ATTLIST index-many-to-many class CDATA #REQUIRED> <!ATTLIST index-many-to-many column CDATA #IMPLIED> ! </pre> ! <pre> <!-- Composite index of a map ie. a map keyed on components. --> ! </pre> ! <pre> <!ELEMENT composite-index ( (key-property|key-many-to-one)+ )> <!ATTLIST composite-index class CDATA #REQUIRED> ! </pre> ! <pre> <!-- Generators generate unique identifiers. The class attribute specifies a Java class implementing an id generation algorithm. --> ! </pre> ! <pre> <!ELEMENT generator (param*)> <!ATTLIST generator class CDATA #REQUIRED> <!ELEMENT param (#PCDATA)> ! </pre> ! <pre> <!-- The column element is an alternative to column attributes and required for mapping associations to classes with composite ids. --> ! </pre> ! <pre> <!ELEMENT column EMPTY> <!ATTLIST column name CDATA #REQUIRED> *************** *** 392,409 **** <!ATTLIST column sql-type CDATA #IMPLIED> <!-- override default column type for hibernate type --> <!ATTLIST column index CDATA #IMPLIED> ! <!-- The jcs-cache element enables caching of an entity class. --> <!ELEMENT jcs-cache EMPTY> <!ATTLIST jcs-cache usage (read-only|read-write) #REQUIRED> ! <!-- The query element declares a named Hibernate query string --> ! <!ELEMENT query (#PCDATA)> <!ATTLIST query name CDATA #REQUIRED> </pre> ! <p class="Body"> ! ! <A href=http://sourceforge.net/projects/hibernate><IMG src=http://sourceforge.net/sflogo.php?group_id=40712></A></p> ! <!--End Section 1--> <!-- End SectLevel1 --> <br> --- 460,477 ---- <!ATTLIST column sql-type CDATA #IMPLIED> <!-- override default column type for hibernate type --> <!ATTLIST column index CDATA #IMPLIED> ! </pre> ! <pre> <!-- The jcs-cache element enables caching of an entity class. --> <!ELEMENT jcs-cache EMPTY> <!ATTLIST jcs-cache usage (read-only|read-write) #REQUIRED> ! </pre> ! <pre> <!-- The query element declares a named Hibernate query string --> ! </pre> ! <pre> <!ELEMENT query (#PCDATA)> <!ATTLIST query name CDATA #REQUIRED> </pre> ! <A href=http://sourceforge.net/projects/hibernate><IMG src=http://sourceforge.net/sflogo.php?group_id=40712></A><!--End Section 1--> <!-- End SectLevel1 --> <br> Index: features.aft =================================================================== RCS file: /cvsroot/hibernate/Hibernate/doc/features.aft,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** features.aft 11 Nov 2002 23:57:13 -0000 1.29 --- features.aft 20 Nov 2002 14:55:46 -0000 1.30 *************** *** 14,17 **** --- 14,18 ---- * supports user-defined types * includes built-in support for a rich subset of JDK types including |Currency|, |Locale|, |BigDecimal|, etc. + [Constraint transparency] The application never needs to worry about foreign key constraint violations, even when there are circular references **Object-oriented query language Index: features.html =================================================================== RCS file: /cvsroot/hibernate/Hibernate/doc/features.html,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** features.html 11 Nov 2002 23:57:13 -0000 1.49 --- features.html 20 Nov 2002 14:55:46 -0000 1.50 *************** *** 31,34 **** --- 31,37 ---- <li> includes built-in support for a rich subset of JDK types including <tt>Currency</tt>, <tt>Locale</tt>, <tt>BigDecimal</tt>, etc.</li> </ul> + <dl> + <dt><strong>Constraint transparency</strong><dd> The application never n... [truncated message content] |
|
From: <one...@us...> - 2002-11-20 14:55:52
|
Update of /cvsroot/hibernate/Hibernate/doc/reference
In directory sc8-pr-cvs1:/tmp/cvs-serv12403/reference
Modified Files:
index.html
Log Message:
removed obsolete doco
Index: index.html
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/doc/reference/index.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** index.html 25 Aug 2002 13:30:54 -0000 1.5
--- index.html 20 Nov 2002 14:55:48 -0000 1.6
***************
*** 22,32 ****
<ul>
<li><a href="html/index.html">Online HTML version</a>
! <li><a href="html_single/index.html">Single Page HTML version</a> (170 kb)
! <li><a href="pdf/hibernate_reference.pdf">PDF Print version</a> (540 kb)
! </ul>
! <ul>
! <li><a href="../hibernate-design.jpg" target="mainFrame">Outline design in UML (for developers)</a>
! <!--<li><a href="../tutorial.html" target="mainFrame">Old (AFT) Documentation</a><br>-->
</ul>
</p>
--- 22,29 ----
<ul>
<li><a href="html/index.html">Online HTML version</a>
! <li><a href="html_single/index.html">Single Page HTML version</a> (230 kb)
! <li><a href="pdf/hibernate_reference.pdf">PDF Print version</a> (670 kb)
</ul>
+
</p>
|
|
From: <one...@us...> - 2002-11-20 14:20:42
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/impl
In directory sc8-pr-cvs1:/tmp/cvs-serv26814/hibernate/impl
Modified Files:
SessionImpl.java
Log Message:
got tests working for firebird
Index: SessionImpl.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/impl/SessionImpl.java,v
retrieving revision 1.151
retrieving revision 1.152
diff -C2 -d -r1.151 -r1.152
*** SessionImpl.java 14 Nov 2002 11:28:55 -0000 1.151
--- SessionImpl.java 20 Nov 2002 14:20:08 -0000 1.152
***************
*** 1329,1333 ****
public void postHydrate(ClassPersister persister, Serializable id, Object[] values, Object object, LockMode lockMode) throws HibernateException {
persister.setIdentifier(object, id);
! addEntry(object, LOADED, values, id, Versioning.getVersion(values, persister), lockMode, true, persister);
}
--- 1329,1336 ----
public void postHydrate(ClassPersister persister, Serializable id, Object[] values, Object object, LockMode lockMode) throws HibernateException {
persister.setIdentifier(object, id);
! Object version = Versioning.getVersion(values, persister);
! addEntry(object, LOADED, values, id, version, lockMode, true, persister);
!
! if ( log.isTraceEnabled() && version!=null ) log.trace("Version: " + version);
}
***************
*** 1520,1528 ****
addEntity( new Key(id, persister), finalResult );
Object[] values = entry.assemble(finalResult, id, subclassPersister, this); // intializes cached by side-effect
- //lock(finalResult, lockMode);
Type[] types = subclassPersister.getPropertyTypes();
- //Object[] values = subclassPersister.getPropertyValues(cached);
TypeFactory.deepCopy(values, types, values);
! addEntry(finalResult, LOADED, values, id, Versioning.getVersion(values, subclassPersister), LockMode.NONE, true, subclassPersister);
// upgrade the lock if necessary:
lock(finalResult, lockMode);
--- 1523,1531 ----
addEntity( new Key(id, persister), finalResult );
Object[] values = entry.assemble(finalResult, id, subclassPersister, this); // intializes cached by side-effect
Type[] types = subclassPersister.getPropertyTypes();
TypeFactory.deepCopy(values, types, values);
! Object version = Versioning.getVersion(values, subclassPersister);
! if ( log.isTraceEnabled() ) log.trace("Cached Version: " + version);
! addEntry(finalResult, LOADED, values, id, version, LockMode.NONE, true, subclassPersister);
// upgrade the lock if necessary:
lock(finalResult, lockMode);
|
|
From: <one...@us...> - 2002-11-20 14:20:42
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/loader In directory sc8-pr-cvs1:/tmp/cvs-serv26814/hibernate/loader Modified Files: Loader.java Log Message: got tests working for firebird Index: Loader.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/loader/Loader.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Loader.java 19 Nov 2002 15:28:06 -0000 1.27 --- Loader.java 20 Nov 2002 14:20:08 -0000 1.28 *************** *** 280,283 **** --- 280,284 ---- // Get the persister for the _subclass_ Loadable persister = (Loadable) session.getPersister(object); + Object[] values = hydrate(rs, id, object, persister, session, suffix); session.postHydrate(persister, id, values, object, getLockMode() ); |
|
From: <one...@us...> - 2002-11-20 14:20:14
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/type
In directory sc8-pr-cvs1:/tmp/cvs-serv26814/hibernate/type
Modified Files:
TimestampType.java
Log Message:
got tests working for firebird
Index: TimestampType.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/type/TimestampType.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** TimestampType.java 28 Oct 2002 15:41:53 -0000 1.29
--- TimestampType.java 20 Nov 2002 14:20:10 -0000 1.30
***************
*** 14,18 ****
}
public void set(PreparedStatement st, Object value, int index) throws SQLException {
-
Timestamp ts;
if (value instanceof Timestamp) {
--- 14,17 ----
|
|
From: <one...@us...> - 2002-11-20 14:20:14
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/test
In directory sc8-pr-cvs1:/tmp/cvs-serv26814/hibernate/test
Modified Files:
ABC.hbm.xml ABCProxy.hbm.xml Baz.hbm.xml Container.hbm.xml
FooBarTest.java MasterDetailTest.java ParentChildTest.java
SQLFunctionsTest.java SingleSeveral.hbm.xml Stuff.hbm.xml
Log Message:
got tests working for firebird
Index: ABC.hbm.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/ABC.hbm.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ABC.hbm.xml 25 Oct 2002 12:26:12 -0000 1.2
--- ABC.hbm.xml 20 Nov 2002 14:20:09 -0000 1.3
***************
*** 10,14 ****
<property name="name"/>
<subclass name="cirrus.hibernate.test.B" discriminator-value="-1">
! <property name="count"/>
<subclass name="cirrus.hibernate.test.C1" discriminator-value="1">
<property name="address" column="c1"/>
--- 10,14 ----
<property name="name"/>
<subclass name="cirrus.hibernate.test.B" discriminator-value="-1">
! <property name="count" column="count_"/>
<subclass name="cirrus.hibernate.test.C1" discriminator-value="1">
<property name="address" column="c1"/>
Index: ABCProxy.hbm.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/ABCProxy.hbm.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ABCProxy.hbm.xml 25 Oct 2002 18:30:51 -0000 1.1
--- ABCProxy.hbm.xml 20 Nov 2002 14:20:09 -0000 1.2
***************
*** 10,14 ****
<property name="name"/>
<subclass name="cirrus.hibernate.test.B" discriminator-value="-1" proxy="cirrus.hibernate.test.B">
! <property name="count"/>
<subclass name="cirrus.hibernate.test.C1" discriminator-value="1" proxy="cirrus.hibernate.test.C1">
<property name="address" column="c1"/>
--- 10,14 ----
<property name="name"/>
<subclass name="cirrus.hibernate.test.B" discriminator-value="-1" proxy="cirrus.hibernate.test.B">
! <property name="count" column="count_"/>
<subclass name="cirrus.hibernate.test.C1" discriminator-value="1" proxy="cirrus.hibernate.test.C1">
<property name="address" column="c1"/>
Index: Baz.hbm.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/Baz.hbm.xml,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** Baz.hbm.xml 5 Nov 2002 13:40:53 -0000 1.20
--- Baz.hbm.xml 20 Nov 2002 14:20:09 -0000 1.21
***************
*** 8,12 ****
<generator class="uuid.hex"/>
</generated-key>
! <element column="element" type="string" not-null="true"/>
</set>
--- 8,12 ----
<generator class="uuid.hex"/>
</generated-key>
! <element column="element" type="string" not-null="true" length="32"/>
</set>
***************
*** 202,206 ****
</key>
<composite-index class="cirrus.hibernate.test.FooComponent">
! <key-property name="name"/>
<key-property name="count" column="count_"/>
</composite-index>
--- 202,206 ----
</key>
<composite-index class="cirrus.hibernate.test.FooComponent">
! <key-property name="name" length="32"/>
<key-property name="count" column="count_"/>
</composite-index>
Index: Container.hbm.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/Container.hbm.xml,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Container.hbm.xml 30 Oct 2002 13:34:25 -0000 1.9
--- Container.hbm.xml 20 Nov 2002 14:20:09 -0000 1.10
***************
*** 43,47 ****
<map role="ternaryMap">
<key column="container_id"/>
! <index column="idx" type="string"/>
<composite-element class="cirrus.hibernate.test.Container$Ternary">
<property name="name"/>
--- 43,47 ----
<map role="ternaryMap">
<key column="container_id"/>
! <index column="idx" type="string" length="32"/>
<composite-element class="cirrus.hibernate.test.Container$Ternary">
<property name="name"/>
Index: FooBarTest.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/FooBarTest.java,v
retrieving revision 1.223
retrieving revision 1.224
diff -C2 -d -r1.223 -r1.224
*** FooBarTest.java 20 Nov 2002 10:30:45 -0000 1.223
--- FooBarTest.java 20 Nov 2002 14:20:09 -0000 1.224
***************
*** 2729,2733 ****
try {
TestCase.exportSchema( new String[] {
! "FooBar.hbm.xml", "Baz.hbm.xml", "Qux.hbm.xml", "Glarch.hbm.xml", "Fum.hbm.xml", "Fumm.hbm.xml", "Fo.hbm.xml", "One.hbm.xml", "Many.hbm.xml", "Immutable.hbm.xml", "Fee.hbm.xml", "Vetoer.hbm.xml", "Holder.hbm.xml", "Location.hbm.xml", "Stuff.hbm.xml"
} );
return new TestSuite(FooBarTest.class);
--- 2729,2749 ----
try {
TestCase.exportSchema( new String[] {
! "FooBar.hbm.xml",
! "Baz.hbm.xml",
! "Qux.hbm.xml",
! "Glarch.hbm.xml",
! "Fum.hbm.xml",
! "Fumm.hbm.xml",
! "Fo.hbm.xml",
! "One.hbm.xml",
! "Many.hbm.xml",
! "Immutable.hbm.xml",
! "Fee.hbm.xml",
! "Vetoer.hbm.xml",
! "Holder.hbm.xml",
! "Location.hbm.xml",
! "Stuff.hbm.xml",
! "Container.hbm.xml",
! "Simple.hbm.xml"
} );
return new TestSuite(FooBarTest.class);
Index: MasterDetailTest.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/MasterDetailTest.java,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** MasterDetailTest.java 7 Nov 2002 11:33:49 -0000 1.40
--- MasterDetailTest.java 20 Nov 2002 14:20:10 -0000 1.41
***************
*** 230,233 ****
--- 230,234 ----
Query q = s.getNamedQuery("all_details");
q.list();
+ s.connection().commit();
s.close();
}
***************
*** 415,419 ****
s.iterate("from c in class Category where c.name = cirrus.hibernate.test.Category.ROOT_CATEGORY").hasNext()
);
!
s.close();
--- 416,420 ----
s.iterate("from c in class Category where c.name = cirrus.hibernate.test.Category.ROOT_CATEGORY").hasNext()
);
! s.connection().commit();
s.close();
***************
*** 471,475 ****
public static Test suite() throws Exception {
TestCase.exportSchema(
! new String[] { "MasterDetail.hbm.xml", "Custom.hbm.xml", "Category.hbm.xml", "Nameable.hbm.xml", "SingleSeveral.hbm.xml" }
);
return new TestSuite(MasterDetailTest.class);
--- 472,482 ----
public static Test suite() throws Exception {
TestCase.exportSchema(
! new String[] {
! "MasterDetail.hbm.xml",
! "Custom.hbm.xml",
! "Category.hbm.xml",
! "Nameable.hbm.xml",
! "SingleSeveral.hbm.xml"
! }
);
return new TestSuite(MasterDetailTest.class);
Index: ParentChildTest.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/ParentChildTest.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** ParentChildTest.java 23 Oct 2002 18:21:58 -0000 1.29
--- ParentChildTest.java 20 Nov 2002 14:20:10 -0000 1.30
***************
*** 499,503 ****
try {
TestCase.exportSchema( new String[] {
! "FooBar.hbm.xml", "Baz.hbm.xml", "Qux.hbm.xml", "Glarch.hbm.xml", "Fum.hbm.xml", "Fumm.hbm.xml", "Fo.hbm.xml", "One.hbm.xml", "Many.hbm.xml", "Immutable.hbm.xml", "Fee.hbm.xml", "Vetoer.hbm.xml", "Holder.hbm.xml", "ParentChild.hbm.xml", "Simple.hbm.xml", "Container.hbm.xml", "Circular.hbm.xml"
} );
return new TestSuite(ParentChildTest.class);
--- 499,520 ----
try {
TestCase.exportSchema( new String[] {
! "FooBar.hbm.xml",
! "Baz.hbm.xml",
! "Qux.hbm.xml",
! "Glarch.hbm.xml",
! "Fum.hbm.xml",
! "Fumm.hbm.xml",
! "Fo.hbm.xml",
! "One.hbm.xml",
! "Many.hbm.xml",
! "Immutable.hbm.xml",
! "Fee.hbm.xml",
! "Vetoer.hbm.xml",
! "Holder.hbm.xml",
! "ParentChild.hbm.xml",
! "Simple.hbm.xml",
! "Container.hbm.xml",
! "Circular.hbm.xml",
! "Stuff.hbm.xml"
} );
return new TestSuite(ParentChildTest.class);
Index: SQLFunctionsTest.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/SQLFunctionsTest.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** SQLFunctionsTest.java 20 Nov 2002 07:06:45 -0000 1.32
--- SQLFunctionsTest.java 20 Nov 2002 14:20:10 -0000 1.33
***************
*** 7,10 ****
--- 7,11 ----
import cirrus.hibernate.*;
import cirrus.hibernate.sql.DB2Dialect;
+ import cirrus.hibernate.sql.InterbaseDialect;
import cirrus.hibernate.sql.MySQLDialect;
import cirrus.hibernate.sql.SAPDBDialect;
***************
*** 39,52 ****
s.find("from s in class Simple where not( upper( s.name ) ='yada' or 1=2 or 'foo'='bar' or not('foo'='foo') or 'foo' like 'bar' )").size()==1
);
! if ( !(dialect instanceof MySQLDialect) && !(dialect instanceof SybaseDialect)) { //My SQL has a funny concatenation operator
assertTrue(
s.find("from s in class Simple where lower( s.name || ' foo' ) ='simple 1 foo'").size()==1
);
}
! if ( (dialect instanceof SybaseDialect)) {
assertTrue(
s.find("from s in class Simple where lower( s.name + ' foo' ) ='simple 1 foo'").size()==1
);
! }
Simple other = new Simple();
--- 40,53 ----
s.find("from s in class Simple where not( upper( s.name ) ='yada' or 1=2 or 'foo'='bar' or not('foo'='foo') or 'foo' like 'bar' )").size()==1
);
! if ( !(dialect instanceof MySQLDialect) && !(dialect instanceof SybaseDialect) && !(dialect instanceof InterbaseDialect) ) { //My SQL has a funny concatenation operator
assertTrue(
s.find("from s in class Simple where lower( s.name || ' foo' ) ='simple 1 foo'").size()==1
);
}
! if ( (dialect instanceof SybaseDialect) ) {
assertTrue(
s.find("from s in class Simple where lower( s.name + ' foo' ) ='simple 1 foo'").size()==1
);
! }
Simple other = new Simple();
***************
*** 57,61 ****
//s.find("from s in class Simple where s.name ## 'cat|rat|bag'");
assertTrue(
! s.find("from s in class Simple where lower( s.other.name ) ='simple 2'").size()==1
);
assertTrue(
--- 58,65 ----
//s.find("from s in class Simple where s.name ## 'cat|rat|bag'");
assertTrue(
! s.find("from s in class Simple where upper( s.other.name ) ='SIMPLE 2'").size()==1
! );
! assertTrue(
! s.find("from s in class Simple where not ( upper( s.other.name ) ='SIMPLE 2' )").size()==0
);
assertTrue(
Index: SingleSeveral.hbm.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/SingleSeveral.hbm.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SingleSeveral.hbm.xml 7 Nov 2002 10:12:15 -0000 1.1
--- SingleSeveral.hbm.xml 20 Nov 2002 14:20:10 -0000 1.2
***************
*** 7,12 ****
<class name="cirrus.hibernate.test.Single">
<composite-id>
! <key-property name="id"/>
! <key-property name="string"/>
</composite-id>
<property name="prop"/>
--- 7,12 ----
<class name="cirrus.hibernate.test.Single">
<composite-id>
! <key-property name="id" length="32"/>
! <key-property name="string" length="32"/>
</composite-id>
<property name="prop"/>
***************
*** 22,31 ****
<class name="cirrus.hibernate.test.Several">
<composite-id>
! <key-property name="id"/>
! <key-property name="string"/>
</composite-id>
<many-to-one name="single">
! <column name="single_id"/>
! <column name="single_string"/>
</many-to-one>
</class>
--- 22,31 ----
<class name="cirrus.hibernate.test.Several">
<composite-id>
! <key-property name="id" length="32"/>
! <key-property name="string" length="32"/>
</composite-id>
<many-to-one name="single">
! <column name="single_id" length="32"/>
! <column name="single_string" length="32"/>
</many-to-one>
</class>
Index: Stuff.hbm.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/Stuff.hbm.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Stuff.hbm.xml 7 Nov 2002 11:33:49 -0000 1.5
--- Stuff.hbm.xml 20 Nov 2002 14:20:10 -0000 1.6
***************
*** 6,10 ****
<composite-id>
<key-property name="intId"/>
! <key-property name="stringId"/>
</composite-id>
<property name="name"/>
--- 6,10 ----
<composite-id>
<key-property name="intId"/>
! <key-property name="stringId" length="32"/>
</composite-id>
<property name="name"/>
***************
*** 13,17 ****
<!--unfortunately have to specify not-null here because of limitation in schema export....-->
<column name="moreInt" not-null="true"/>
! <column name="moreString" not-null="true"/>
</key>
<one-to-many class="cirrus.hibernate.test.Stuff"/>
--- 13,17 ----
<!--unfortunately have to specify not-null here because of limitation in schema export....-->
<column name="moreInt" not-null="true"/>
! <column name="moreString" not-null="true" length="32"/>
</key>
<one-to-many class="cirrus.hibernate.test.Stuff"/>
***************
*** 25,29 ****
<key-many-to-one name="moreStuff" class="cirrus.hibernate.test.MoreStuff">
<column name="moreInt"/>
! <column name="moreString"/>
</key-many-to-one>
</composite-id>
--- 25,29 ----
<key-many-to-one name="moreStuff" class="cirrus.hibernate.test.MoreStuff">
<column name="moreInt"/>
! <column name="moreString" length="32"/>
</key-many-to-one>
</composite-id>
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/test
In directory sc8-pr-cvs1:/tmp/cvs-serv6163/cirrus/hibernate/test
Modified Files:
ABCProxyTest.java ABCTest.java Bar.java FooBar.hbm.xml
FooBarTest.java Holder.java MultiTableTest.java
Log Message:
load(id, lockMode) now working for MultiTableEntityPersister
some new tests
Index: ABCProxyTest.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/ABCProxyTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ABCProxyTest.java 25 Oct 2002 19:10:39 -0000 1.2
--- ABCProxyTest.java 20 Nov 2002 10:30:45 -0000 1.3
***************
*** 15,19 ****
}
! public void testCollectionQuery() throws Exception {
Session s = sessions.openSession();
Transaction t = s.beginTransaction();
--- 15,19 ----
}
! public void testSubclassing() throws Exception {
Session s = sessions.openSession();
Transaction t = s.beginTransaction();
Index: ABCTest.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/ABCTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ABCTest.java 18 Oct 2002 15:16:11 -0000 1.1
--- ABCTest.java 20 Nov 2002 10:30:45 -0000 1.2
***************
*** 15,19 ****
}
! public void testCollectionQuery() throws Exception {
Session s = sessions.openSession();
Transaction t = s.beginTransaction();
--- 15,19 ----
}
! public void testSubclassing() throws Exception {
Session s = sessions.openSession();
Transaction t = s.beginTransaction();
***************
*** 28,31 ****
--- 28,34 ----
d.setId( c1.getId() );
s.save(d);
+
+ assertTrue( s.find("from c in class C2 where 1=1 or 1=1").size()==0 );
+
t.commit();
s.close();
Index: Bar.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/Bar.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** Bar.java 10 Jun 2002 15:31:25 -0000 1.10
--- Bar.java 20 Nov 2002 10:30:45 -0000 1.11
***************
*** 2,6 ****
package cirrus.hibernate.test;
! public class Bar extends Abstract implements BarProxy {
private String barString;
private FooComponent barComponent = new FooComponent("bar", 69, null, null);
--- 2,6 ----
package cirrus.hibernate.test;
! public class Bar extends Abstract implements BarProxy, Named {
private String barString;
private FooComponent barComponent = new FooComponent("bar", 69, null, null);
***************
*** 29,32 ****
--- 29,42 ----
public void setBaz(Baz baz) {
this.baz = baz;
+ }
+
+ public String name = "bar";
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
}
Index: FooBar.hbm.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/FooBar.hbm.xml,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** FooBar.hbm.xml 29 Oct 2002 16:09:05 -0000 1.16
--- FooBar.hbm.xml 20 Nov 2002 10:30:45 -0000 1.17
***************
*** 121,124 ****
--- 121,125 ----
<column name="bar_string" length="24"/>
</property>
+ <property name="name" column="name_name"/>
<component name="barComponent" class="cirrus.hibernate.test.FooComponent">
<parent name="parent"/>
Index: FooBarTest.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/FooBarTest.java,v
retrieving revision 1.222
retrieving revision 1.223
diff -C2 -d -r1.222 -r1.223
*** FooBarTest.java 19 Nov 2002 15:28:07 -0000 1.222
--- FooBarTest.java 20 Nov 2002 10:30:45 -0000 1.223
***************
*** 513,516 ****
--- 513,517 ----
baz.getOnes().remove(o);
s.delete("from o in class cirrus.hibernate.test.One");
+ s.delete(h);
s.flush();
s.connection().commit();
***************
*** 820,828 ****
assertTrue( !rs.hasNext() );
! System.out.println( s.find("from o in class java.lang.Object") );
! System.out.println( s.find("from n0 in class Named, n1 in class Named where n0.name = n1.name") );
iter = s.iterate("from o in class java.lang.Object");
! while ( iter.hasNext() ) System.out.print( ":" + iter.next() );
! System.out.println();
s.iterate("select baz.code, min(baz.count) from baz in class Baz group by baz.code");
--- 821,853 ----
assertTrue( !rs.hasNext() );
! s.save( new Holder("ice T") );
! s.save( new Holder("ice cube") );
!
! assertTrue( s.find("from o in class java.lang.Object").size()==15 );
! System.out.println( s.find("from n in class Named") );
! assertTrue( s.find("from n in class Named").size()==7 );
! assertTrue( s.find("from n in class Named where n.name is not null").size()==4 );
! iter = s.iterate("from n in class Named");
! while ( iter.hasNext() ) {
! assertTrue( iter.next() instanceof Named );
! }
!
! s.save( new Holder("bar") );
! iter = s.iterate("from n0 in class Named, n1 in class Named where n0.name = n1.name");
! int cnt = 0;
! while ( iter.hasNext() ) {
! Object[] row = (Object[]) iter.next();
! if ( row[0]!=row[1] ) cnt++;
! }
! assertTrue(cnt==2);
! assertTrue( s.find("from n0 in class Named, n1 in class Named where n0.name = n1.name").size()==7 );
!
iter = s.iterate("from o in class java.lang.Object");
! int c = 0;
! while ( iter.hasNext() ) {
! iter.next();
! c++;
! }
! assertTrue(c==16);
s.iterate("select baz.code, min(baz.count) from baz in class Baz group by baz.code");
***************
*** 837,841 ****
s.delete(other);
s.delete(foo);
!
s.flush();
s.connection().commit();
--- 862,866 ----
s.delete(other);
s.delete(foo);
! s.delete("from h in class Holder");
s.flush();
s.connection().commit();
Index: Holder.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/Holder.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Holder.java 15 Oct 2002 03:36:10 -0000 1.2
--- Holder.java 20 Nov 2002 10:30:45 -0000 1.3
***************
*** 10,13 ****
--- 10,20 ----
private Set foos;
private String name;
+
+ public Holder() {
+ }
+ public Holder(String name) {
+ this.name=name;
+ }
+
/**
* Returns the fooArray.
Index: MultiTableTest.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/MultiTableTest.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** MultiTableTest.java 5 Nov 2002 10:42:52 -0000 1.10
--- MultiTableTest.java 20 Nov 2002 10:30:45 -0000 1.11
***************
*** 98,101 ****
--- 98,109 ----
s = sessions.openSession();
t = s.beginTransaction();
+ multi = (Multi) s.load( Simple.class, new Long(123), LockMode.UPGRADE );
+ simp = (Simple) s.load( Simple.class, new Long(1234) );
+ s.lock(simp, LockMode.UPGRADE_NOWAIT);
+ t.commit();
+ s.close();
+
+ s = sessions.openSession();
+ t = s.beginTransaction();
s.update( multi, new Long(123) );
s.delete(multi);
|
|
From: <one...@us...> - 2002-11-20 10:30:48
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/persister In directory sc8-pr-cvs1:/tmp/cvs-serv6163/cirrus/hibernate/persister Modified Files: MultiTableEntityPersister.java Log Message: load(id, lockMode) now working for MultiTableEntityPersister some new tests Index: MultiTableEntityPersister.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/persister/MultiTableEntityPersister.java,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** MultiTableEntityPersister.java 18 Nov 2002 11:43:30 -0000 1.30 --- MultiTableEntityPersister.java 20 Nov 2002 10:30:45 -0000 1.31 *************** *** 8,12 **** import cirrus.hibernate.id.NativeGenerator; import cirrus.hibernate.loader.EntityLoader; - import cirrus.hibernate.loader.SimpleEntityLoader; import cirrus.hibernate.loader.UniqueEntityLoader; import cirrus.hibernate.map.Column; --- 8,11 ---- *************** *** 115,119 **** private transient final String discriminatorSQLString; ! protected transient final Map loaders = new HashMap(); protected transient final Map lockers = new HashMap(); --- 114,119 ---- private transient final String discriminatorSQLString; ! protected transient UniqueEntityLoader loader; ! //protected transient final Map loaders = new HashMap(); protected transient final Map lockers = new HashMap(); *************** *** 154,181 **** ! UniqueEntityLoader loader = //new SimpleEntityLoader(this, generateSelectString(), LockMode.READ); new EntityLoader(this, factory); - loaders.put( LockMode.NONE, loader ); - loaders.put( LockMode.READ, loader ); - - String selectForUpdate = factory.getDialect().supportsForUpdate() ? - generateSelectForUpdateString() : - generateSelectString(); - - loaders.put( - LockMode.UPGRADE, - new SimpleEntityLoader( this, selectForUpdate, LockMode.UPGRADE ) - ); - - String selectForUpdateNowait = factory.getDialect().supportsForUpdateNowait() ? - generateSelectForUpdateNowaitString() : - selectForUpdate; - - loaders.put( - LockMode.UPGRADE_NOWAIT, - new SimpleEntityLoader( this, selectForUpdateNowait, LockMode.UPGRADE_NOWAIT ) - ); - } --- 154,160 ---- ! loader = //new SimpleEntityLoader(this, generateSelectString(), LockMode.READ); new EntityLoader(this, factory); } *************** *** 567,571 **** if ( log.isTraceEnabled() ) log.trace( "Materializing entity: " + getClassName() + '#' + id ); ! return ( (UniqueEntityLoader) loaders.get(lockMode) ).load(session, id, optionalObject); } --- 546,554 ---- if ( log.isTraceEnabled() ) log.trace( "Materializing entity: " + getClassName() + '#' + id ); ! Object result = loader.load(session, id, optionalObject); ! ! lock(id, getVersion(result), result, lockMode, session); ! ! return result; } |
|
From: <one...@us...> - 2002-11-20 10:30:48
|
Update of /cvsroot/hibernate/Hibernate In directory sc8-pr-cvs1:/tmp/cvs-serv6163 Modified Files: changelog.txt Log Message: load(id, lockMode) now working for MultiTableEntityPersister some new tests Index: changelog.txt =================================================================== RCS file: /cvsroot/hibernate/Hibernate/changelog.txt,v retrieving revision 1.268 retrieving revision 1.269 diff -C2 -d -r1.268 -r1.269 *** changelog.txt 20 Nov 2002 07:11:51 -0000 1.268 --- changelog.txt 20 Nov 2002 10:30:45 -0000 1.269 *************** *** 11,14 **** --- 11,15 ---- * query expressions like "not (foo.bar.baz=1)" now translated to "(bar.baz!=1 and foo.bar=bar.id)" * support for PostgreSQL ~ operator (regular expression match) + * load(id, lockMode) now working for normalized table mappings Changes in version 1.2 beta 2 (15.11.2002) |
|
From: <tu...@us...> - 2002-11-20 10:29:14
|
Update of /cvsroot/hibernate/Hibernate/doc/reference/pdf In directory sc8-pr-cvs1:/tmp/cvs-serv6437/doc/reference/pdf Modified Files: hibernate_reference.pdf Log Message: Update to current XML source - thumbnails somewhat broken Index: hibernate_reference.pdf =================================================================== RCS file: /cvsroot/hibernate/Hibernate/doc/reference/pdf/hibernate_reference.pdf,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsknglpb and /tmp/cvsCybWr4 differ |
|
From: <tu...@us...> - 2002-11-20 10:28:10
|
Update of /cvsroot/hibernate/Hibernate/doc/reference/src
In directory sc8-pr-cvs1:/tmp/cvs-serv6000/doc/reference/src
Modified Files:
session_configuration.xml
Log Message:
Spelling
Index: session_configuration.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/doc/reference/src/session_configuration.xml,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** session_configuration.xml 14 Nov 2002 12:57:37 -0000 1.23
--- session_configuration.xml 20 Nov 2002 10:28:08 -0000 1.24
***************
*** 61,65 ****
<sect1 id="session-configuration-s3">
! <title>User provided JDBC Connection</title>
<para>
--- 61,65 ----
<sect1 id="session-configuration-s3">
! <title>User provided JDBC connection</title>
<para>
|
|
From: <tu...@us...> - 2002-11-20 10:27:51
|
Update of /cvsroot/hibernate/Hibernate/doc/reference/src
In directory sc8-pr-cvs1:/tmp/cvs-serv5812/doc/reference/src
Modified Files:
manipulating_data.xml
Log Message:
Fix in section IDs
Index: manipulating_data.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/doc/reference/src/manipulating_data.xml,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** manipulating_data.xml 28 Oct 2002 15:41:55 -0000 1.26
--- manipulating_data.xml 20 Nov 2002 10:27:48 -0000 1.27
***************
*** 760,850 ****
</itemizedlist>
! <sect2 id="manipulating-data-s13b">
!
! <title>Flushing the session</title>
! <para>
! If you happen to be using the <literal>Transaction</literal> API, you don't
! need to worry about this step. It will be performed implicitly when the
! transaction is committed. Otherwise you should call
! <literal>Session.flush()</literal> to ensure that all changes are synchronized
! with the database.
! </para>
!
! </sect2>
! <sect2 id="manipulating-data-s13b">
! <title>Committing the transaction</title>
! <para>
! If you are using the Hibernate <literal>Transaction</literal> API, this looks like:
! </para>
! <programlisting><![CDATA[tx.commit(); // flush the Session and commit the transaction]]></programlisting>
! <para>
! If you are managing JDBC transactions yourself you should manually
! <literal>commit()</literal> the JDBC connection.
! </para>
! <programlisting><![CDATA[sess.flush();
sess.connection().commit(); //not necessary for JTA datasource]]></programlisting>
! <para>
! If you decide <emphasis>not</emphasis> to commit your changes:
! </para>
! <programlisting><![CDATA[tx.rollback(); // rollback the transaction]]></programlisting>
! <para>
! or:
! </para>
! <programlisting><![CDATA[//not necessary for JTA datasource, important otherwise
sess.connection().rollback();]]></programlisting>
! </sect2>
! <sect2 id="manipulating-data-s13c">
! <title>Closing the session</title>
!
! <para>
! A call to <literal>Session.close()</literal> marks the end of a session. The main implication
! of <literal>close()</literal> is that the JDBC connection will be relinquished by the session.
! </para>
! <programlisting><![CDATA[tx.commit();
sess.close();]]></programlisting>
! <programlisting><![CDATA[sess.flush();
sess.connection().commit(); //not necessary for JTA datasource
sess.close();]]></programlisting>
! <para>
! If you provided your own connection, <literal>close()</literal> returns a reference
! to it, so you can manually close it or return it to the pool. Otherwise <literal>close()
! </literal> returns it to the pool.
! </para>
!
! </sect2>
! <sect2 id="manipulating-data-s13d">
! <title>Exception handling</title>
! <para>
! If the <literal>Session</literal> throws an exception (including
! any <literal>SQLException</literal>), you should immediately
! rollback the transaction, call <literal>Session.close()</literal>
! and discard the <literal>Session</literal> instance. Certain
! methods of <literal>Session</literal> will <emphasis>not</emphasis>
! leave the session in a consistent state.
! </para>
! <para>
! The following exception handling idiom is recommended:
! </para>
! <programlisting><![CDATA[Session sess = factory.openSession();
Transaction tx = null;
try {
--- 760,849 ----
</itemizedlist>
! <sect2 id="manipulating-data-s13-1">
!
! <title>Flushing the session</title>
! <para>
! If you happen to be using the <literal>Transaction</literal> API, you don't
! need to worry about this step. It will be performed implicitly when the
! transaction is committed. Otherwise you should call
! <literal>Session.flush()</literal> to ensure that all changes are synchronized
! with the database.
! </para>
!
! </sect2>
! <sect2 id="manipulating-data-s13-2">
! <title>Committing the transaction</title>
! <para>
! If you are using the Hibernate <literal>Transaction</literal> API, this looks like:
! </para>
! <programlisting><![CDATA[tx.commit(); // flush the Session and commit the transaction]]></programlisting>
! <para>
! If you are managing JDBC transactions yourself you should manually
! <literal>commit()</literal> the JDBC connection.
! </para>
! <programlisting><![CDATA[sess.flush();
sess.connection().commit(); //not necessary for JTA datasource]]></programlisting>
! <para>
! If you decide <emphasis>not</emphasis> to commit your changes:
! </para>
! <programlisting><![CDATA[tx.rollback(); // rollback the transaction]]></programlisting>
! <para>
! or:
! </para>
! <programlisting><![CDATA[//not necessary for JTA datasource, important otherwise
sess.connection().rollback();]]></programlisting>
! </sect2>
! <sect2 id="manipulating-data-s13-3">
! <title>Closing the session</title>
! <para>
! A call to <literal>Session.close()</literal> marks the end of a session. The main implication
! of <literal>close()</literal> is that the JDBC connection will be relinquished by the session.
! </para>
!
! <programlisting><![CDATA[tx.commit();
sess.close();]]></programlisting>
! <programlisting><![CDATA[sess.flush();
sess.connection().commit(); //not necessary for JTA datasource
sess.close();]]></programlisting>
+ <para>
+ If you provided your own connection, <literal>close()</literal> returns a reference
+ to it, so you can manually close it or return it to the pool. Otherwise <literal>close()
+ </literal> returns it to the pool.
+ </para>
! </sect2>
! <sect2 id="manipulating-data-s13-4">
! <title>Exception handling</title>
! <para>
! If the <literal>Session</literal> throws an exception (including
! any <literal>SQLException</literal>), you should immediately
! rollback the transaction, call <literal>Session.close()</literal>
! and discard the <literal>Session</literal> instance. Certain
! methods of <literal>Session</literal> will <emphasis>not</emphasis>
! leave the session in a consistent state.
! </para>
! <para>
! The following exception handling idiom is recommended:
! </para>
! <programlisting><![CDATA[Session sess = factory.openSession();
Transaction tx = null;
try {
***************
*** 862,870 ****
}]]></programlisting>
! <para>
! Or, when manually managing JDBC transactions:
! </para>
! <programlisting><![CDATA[Session sess = factory.openSession();
try {
//do some work
--- 861,869 ----
}]]></programlisting>
! <para>
! Or, when manually managing JDBC transactions:
! </para>
! <programlisting><![CDATA[Session sess = factory.openSession();
try {
//do some work
***************
*** 881,889 ****
}]]></programlisting>
! <para>
! Or, when using a datasource enlisted with JTA:
! </para>
! <programlisting><![CDATA[UserTransaction ut = .... ;
Session sess = factory.openSession();
try {
--- 880,888 ----
}]]></programlisting>
! <para>
! Or, when using a datasource enlisted with JTA:
! </para>
! <programlisting><![CDATA[UserTransaction ut = .... ;
Session sess = factory.openSession();
try {
***************
*** 900,922 ****
}]]></programlisting>
! </sect2>
</sect1>
! <sect1 id="manipulating-data-s17">
! <title>Interceptors</title>
! <para>
! 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>
! when an <literal>Auditable</literal> is created and updates the
! <literal>lastUpdateTimestamp</literal> property when an <literal>Auditable</literal> is
! updated.
! </para>
! </sect1>
! <programlisting><![CDATA[package cirrus.hibernate.test;
import java.io.Serializable;
--- 899,920 ----
}]]></programlisting>
! </sect2>
</sect1>
! <sect1 id="manipulating-data-s14">
! <title>Interceptors</title>
! <para>
! 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>
! when an <literal>Auditable</literal> is created and updates the
! <literal>lastUpdateTimestamp</literal> property when an <literal>Auditable</literal> is
! updated.
! </para>
! <programlisting><![CDATA[package cirrus.hibernate.test;
import java.io.Serializable;
***************
*** 977,985 ****
}]]></programlisting>
! <para>
! The interceptor would be specified when a session is created.
! </para>
! <programlisting><![CDATA[Session session = sf.openSession( new AuditInterceptor() );]]></programlisting>
</chapter>
--- 975,985 ----
}]]></programlisting>
! <para>
! The interceptor would be specified when a session is created.
! </para>
! <programlisting><![CDATA[Session session = sf.openSession( new AuditInterceptor() );]]></programlisting>
!
! </sect1>
</chapter>
|
|
From: <tu...@us...> - 2002-11-20 10:27:06
|
Update of /cvsroot/hibernate/Hibernate/doc/reference/src
In directory sc8-pr-cvs1:/tmp/cvs-serv5491/doc/reference/src
Modified Files:
advanced_or_mapping.xml
Log Message:
Fix in section IDs
Index: advanced_or_mapping.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/doc/reference/src/advanced_or_mapping.xml,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** advanced_or_mapping.xml 5 Nov 2002 13:40:54 -0000 1.24
--- advanced_or_mapping.xml 20 Nov 2002 10:27:03 -0000 1.25
***************
*** 554,558 ****
! <sect2 id="adv-or-mapping-s1-10">
<title>Ternary Associations</title>
<para>
--- 554,558 ----
! <sect2 id="adv-or-mapping-s1-11">
<title>Ternary Associations</title>
<para>
***************
*** 576,580 ****
</sect2>
! <sect2 id="adv-or-mapping-s1-11">
<title>Collection Example</title>
--- 576,580 ----
</sect2>
! <sect2 id="adv-or-mapping-s1-12">
<title>Collection Example</title>
|
|
From: <one...@us...> - 2002-11-20 07:11:54
|
Update of /cvsroot/hibernate/Hibernate In directory sc8-pr-cvs1:/tmp/cvs-serv3656 Modified Files: changelog.txt Log Message: query expressions like not (foo.bar.baz=1) now translated to (bar.baz!=1 and foo.bar=bar.id) support for postgres ~ operator Index: changelog.txt =================================================================== RCS file: /cvsroot/hibernate/Hibernate/changelog.txt,v retrieving revision 1.267 retrieving revision 1.268 diff -C2 -d -r1.267 -r1.268 *** changelog.txt 19 Nov 2002 15:35:35 -0000 1.267 --- changelog.txt 20 Nov 2002 07:11:51 -0000 1.268 *************** *** 9,12 **** --- 9,14 ---- * allow "not between", "not in" in query language * allow subqueries beginning with a from clause in query language + * query expressions like "not (foo.bar.baz=1)" now translated to "(bar.baz!=1 and foo.bar=bar.id)" + * support for PostgreSQL ~ operator (regular expression match) Changes in version 1.2 beta 2 (15.11.2002) |
|
From: <one...@us...> - 2002-11-20 07:06:48
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/test
In directory sc8-pr-cvs1:/tmp/cvs-serv2204/hibernate/test
Modified Files:
SQLFunctionsTest.java
Log Message:
query expressions like not (foo.bar.baz=1) now translated to (bar.baz!=1 and foo.bar=bar.id)
support for postgres ~ operator
Index: SQLFunctionsTest.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/SQLFunctionsTest.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** SQLFunctionsTest.java 14 Nov 2002 11:28:55 -0000 1.31
--- SQLFunctionsTest.java 20 Nov 2002 07:06:45 -0000 1.32
***************
*** 36,39 ****
--- 36,42 ----
s.find("from s in class Simple where upper( s.name ) ='SIMPLE 1'").size()==1
);
+ assertTrue(
+ s.find("from s in class Simple where not( upper( s.name ) ='yada' or 1=2 or 'foo'='bar' or not('foo'='foo') or 'foo' like 'bar' )").size()==1
+ );
if ( !(dialect instanceof MySQLDialect) && !(dialect instanceof SybaseDialect)) { //My SQL has a funny concatenation operator
assertTrue(
|
|
From: <one...@us...> - 2002-11-20 07:06:47
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/query
In directory sc8-pr-cvs1:/tmp/cvs-serv2204/hibernate/query
Modified Files:
ParserHelper.java PreprocessingParser.java
QueryTranslator.java WhereParser.java
Log Message:
query expressions like not (foo.bar.baz=1) now translated to (bar.baz!=1 and foo.bar=bar.id)
support for postgres ~ operator
Index: ParserHelper.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/query/ParserHelper.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** ParserHelper.java 19 Nov 2002 15:28:07 -0000 1.10
--- ParserHelper.java 20 Nov 2002 07:06:44 -0000 1.11
***************
*** 10,14 ****
public static final String HQL_VARIABLE_PREFIX = ":";
! public static final String HQL_SEPERATORS = " \n\r\f\t,()=<>&|+-=/*'^![]#";
//NOTICE: no " or . since they are part of (compound) identifiers
public static final String PATH_SEPERATORS = ".";
--- 10,14 ----
public static final String HQL_VARIABLE_PREFIX = ":";
! public static final String HQL_SEPERATORS = " \n\r\f\t,()=<>&|+-=/*'^![]#~";
//NOTICE: no " or . since they are part of (compound) identifiers
public static final String PATH_SEPERATORS = ".";
Index: PreprocessingParser.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/query/PreprocessingParser.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** PreprocessingParser.java 19 Nov 2002 15:28:07 -0000 1.1
--- PreprocessingParser.java 20 Nov 2002 07:06:44 -0000 1.2
***************
*** 23,26 ****
--- 23,27 ----
operators.add("<>");
operators.add("!#");
+ operators.add("!~");
operators.add("!<");
operators.add("!>");
Index: QueryTranslator.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/query/QueryTranslator.java,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** QueryTranslator.java 19 Nov 2002 15:28:07 -0000 1.44
--- QueryTranslator.java 20 Nov 2002 07:06:44 -0000 1.45
***************
*** 47,56 ****
--- 47,71 ----
//dontSpace.add("'");
dontSpace.add(".");
+ dontSpace.add("+");
+ dontSpace.add("-");
+ dontSpace.add("/");
+ dontSpace.add("*");
dontSpace.add("<");
dontSpace.add(">");
dontSpace.add("=");
dontSpace.add("#");
+ dontSpace.add("~");
dontSpace.add("|");
dontSpace.add("&");
+ dontSpace.add("<=");
+ dontSpace.add(">=");
+ dontSpace.add("=>");
+ dontSpace.add("=<");
+ dontSpace.add("!=");
+ dontSpace.add("<>");
+ dontSpace.add("!#");
+ dontSpace.add("!~");
+ dontSpace.add("!<");
+ dontSpace.add("!>");
dontSpace.add("("); //for MySQL
dontSpace.add(")");
Index: WhereParser.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/query/WhereParser.java,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** WhereParser.java 19 Nov 2002 15:28:07 -0000 1.38
--- WhereParser.java 20 Nov 2002 07:06:44 -0000 1.39
***************
*** 2,7 ****
--- 2,9 ----
package cirrus.hibernate.query;
+ import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
+ import java.util.Map;
import java.util.Set;
import java.util.StringTokenizer;
***************
*** 39,42 ****
--- 41,45 ----
private static final Set expressionOpeners = new HashSet(); //tokens that open a sub expression
private static final Set booleanOperators = new HashSet(); //tokens that would indicate a sub expression is a boolean expression
+ private static final Map negations = new HashMap();
static {
***************
*** 55,58 ****
--- 58,62 ----
booleanOperators.add(">");
booleanOperators.add("#");
+ booleanOperators.add("~");
booleanOperators.add("like");
booleanOperators.add("is");
***************
*** 70,73 ****
--- 74,78 ----
booleanOperators.add("<>");
booleanOperators.add("!#");
+ booleanOperators.add("!~");
booleanOperators.add("!<");
booleanOperators.add("!>");
***************
*** 78,81 ****
--- 83,114 ----
booleanOperators.add("not exists");
+ negations.put("and", "or");
+ negations.put("or", "and");
+ negations.put("<", ">=");
+ negations.put("=", "<>");
+ negations.put(">", "<=");
+ negations.put("#", "!#");
+ negations.put("~", "!~");
+ negations.put("like", "not like");
+ negations.put("is", "is not");
+ negations.put("in", "not in");
+ negations.put("exists", "not exists");
+ negations.put("between", "not between");
+ negations.put("<=", ">");
+ negations.put(">=", "<");
+ negations.put("=>", "<");
+ negations.put("=<", ">");
+ negations.put("!=", "=");
+ negations.put("<>", "=");
+ negations.put("!#", "#");
+ negations.put("!~", "~");
+ negations.put("!<", ">=");
+ negations.put("!>", "<=");
+ negations.put("is not", "is");
+ negations.put("not like", "like");
+ negations.put("not in", "in");
+ negations.put("not between", "between");
+ negations.put("not exists", "exists");
+
}
// Handles things like:
***************
*** 100,104 ****
private boolean quoted = false; //Inside a quoted string
private boolean betweenSpecialCase = false; //Inside a BETWEEN ... AND ... expression
! private int bracketsSinceFunction = 0; //How deep inside in IN are we?
private boolean inSubselect = false;
--- 133,138 ----
private boolean quoted = false; //Inside a quoted string
private boolean betweenSpecialCase = false; //Inside a BETWEEN ... AND ... expression
! private int bracketsSinceFunction = 0; //How deep inside in IN are we?
! private boolean negated = false;
private boolean inSubselect = false;
***************
*** 112,119 ****
// in the list of nested subexpressions we are currently processing.
! private LinkedList unaryCounts = new LinkedList(); //how many NOTs were encountered
private LinkedList joins = new LinkedList(); //the join string built up by compound paths inside this expression
private LinkedList booleanTests = new LinkedList(); //a flag indicating if the subexpression is known to be boolean
public void token(String token, QueryTranslator q) throws QueryException {
String lcToken = token.toLowerCase();
--- 146,155 ----
// in the list of nested subexpressions we are currently processing.
! private LinkedList nots = new LinkedList(); //were an odd or even number of NOTs encountered
private LinkedList joins = new LinkedList(); //the join string built up by compound paths inside this expression
private LinkedList booleanTests = new LinkedList(); //a flag indicating if the subexpression is known to be boolean
+
public void token(String token, QueryTranslator q) throws QueryException {
+
String lcToken = token.toLowerCase();
***************
*** 222,225 ****
--- 258,269 ----
}
+ if ( lcToken.equals("not") ) {
+ nots.addLast(
+ new Boolean( !( (Boolean) nots.removeLast() ).booleanValue() )
+ );
+ negated = !negated;
+ return; //NOTE: early return
+ }
+
//process a token, mapping OO path expressions to SQL expressions
***************
*** 231,237 ****
openExpression(q, lcToken);
}
! else if ( lcToken.equals("not") ) {
startNot(q);
! }
//Cope with special cases of AND, NOT, )
--- 275,281 ----
openExpression(q, lcToken);
}
! /*else if ( lcToken.equals("not") ) {
startNot(q);
! }*/
//Cope with special cases of AND, NOT, )
***************
*** 269,288 ****
// finish off any unary operations
! int count = ( (Integer) unaryCounts.removeLast() ).intValue();
for ( int i=0; i<count; i++ ) { //to allow not not, not not not, etc...
appendToken(q, ")");
! }
}
else {
! unaryCounts.removeLast(); //check that its zero? (As an assertion)
StringBuffer join = (StringBuffer) joins.removeLast();
( (StringBuffer) joins.getLast() ).append( join.toString() );
}
if ( !")".equals(lcToken) ) appendToken(q, ")");
}
! private void openExpression(QueryTranslator q, String lcToken) {
unaryCounts.addLast( new Integer(0) );
booleanTests.addLast(Boolean.FALSE);
joins.addLast( new StringBuffer() );
--- 313,335 ----
// finish off any unary operations
! /*int count = ( (Integer) unaryCounts.removeLast() ).intValue();
for ( int i=0; i<count; i++ ) { //to allow not not, not not not, etc...
appendToken(q, ")");
! }*/
}
else {
! //unaryCounts.removeLast(); //check that its zero? (As an assertion)
StringBuffer join = (StringBuffer) joins.removeLast();
( (StringBuffer) joins.getLast() ).append( join.toString() );
}
+ if ( ( (Boolean) nots.removeLast() ).booleanValue() ) negated = !negated;
+
if ( !")".equals(lcToken) ) appendToken(q, ")");
}
! private void openExpression(QueryTranslator q, String lcToken) {
//unaryCounts.addLast( new Integer(0) );
! nots.addLast(Boolean.FALSE);
booleanTests.addLast(Boolean.FALSE);
joins.addLast( new StringBuffer() );
***************
*** 290,299 ****
}
! private void startNot(QueryTranslator q) {
// increment the count
Integer count = new Integer( ( (Integer) unaryCounts.removeLast() ).intValue() + 1 );
unaryCounts.addLast(count);
appendToken(q, "(");
! }
private void doToken(String token, QueryTranslator q) throws QueryException {
--- 337,346 ----
}
! /*private void startNot(QueryTranslator q) {
// increment the count
Integer count = new Integer( ( (Integer) unaryCounts.removeLast() ).intValue() + 1 );
unaryCounts.addLast(count);
appendToken(q, "(");
! }*/
private void doToken(String token, QueryTranslator q) throws QueryException {
***************
*** 352,356 ****
}
else { //anything else
! appendToken(q, token);
}
}
--- 399,410 ----
}
else { //anything else
!
! String negatedToken = negated ? (String) negations.get( token.toLowerCase() ) : null;
! if ( negatedToken!=null && ( !betweenSpecialCase || !"or".equals(negatedToken) ) ) {
! appendToken(q, negatedToken);
! }
! else {
! appendToken(q, token);
! }
}
}
|
|
From: <one...@us...> - 2002-11-19 15:35:38
|
Update of /cvsroot/hibernate/Hibernate/doc/reference/src
In directory sc8-pr-cvs1:/tmp/cvs-serv2395/doc/reference/src
Modified Files:
query_language.xml
Log Message:
allow not between, not in in query language
allow subqueries beginning with a from clause in query language
Index: query_language.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/doc/reference/src/query_language.xml,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** query_language.xml 28 Oct 2002 15:41:55 -0000 1.20
--- query_language.xml 19 Nov 2002 15:35:35 -0000 1.21
***************
*** 328,333 ****
<para>
! <literal>in</literal> and <literal>between</literal>
! may be used as follows:
</para>
--- 328,332 ----
<para>
! <literal>in</literal> and <literal>between</literal> may be used as follows:
</para>
***************
*** 337,357 ****
<para>
! but the negated forms should be written
! </para>
!
! <programlisting><![CDATA[from cat in class eg.DomesticCat where not cat.name between 'A' and 'B'
!
! from cat in class eg.DomesticCat where not cat.name in ( 'Foo', 'Bar', Baz" )]]></programlisting>
!
! <para>
! rather than
</para>
! <programlisting><![CDATA[from cat in class eg.DomesticCat where cat.name not between 'A' and 'B' (Error)
! from cat in class eg.DomesticCat where cat.name not in ( 'Foo', 'Bar', Baz" ) (Error)]]></programlisting>
<para>
! However, both <literal>is null</literal> and <literal>is not null</literal> may be used to test
for null values.
</para>
--- 336,348 ----
<para>
! and the negated forms may be written
</para>
! <programlisting><![CDATA[from cat in class eg.DomesticCat where cat.name not between 'A' and 'B'
! from cat in class eg.DomesticCat where cat.name not in ( 'Foo', 'Bar', Baz" )]]></programlisting>
<para>
! Likewise, <literal>is null</literal> and <literal>is not null</literal> may be used to test
for null values.
</para>
***************
*** 534,538 ****
from cat in class eg.DomesticCat where cat.name =
! some( select list.name from list in class eg.NameList )]]></programlisting>
</sect1>
--- 525,532 ----
from cat in class eg.DomesticCat where cat.name =
! some( select list.name from list in class eg.NameList )
!
! from cat in class eg.Cat where not exists
! ( from mate in class eg.Cat where mate.mate = cat )]]></programlisting>
</sect1>
|
|
From: <one...@us...> - 2002-11-19 15:35:38
|
Update of /cvsroot/hibernate/Hibernate/doc/reference/html_single
In directory sc8-pr-cvs1:/tmp/cvs-serv2395/doc/reference/html_single
Modified Files:
index.html
Log Message:
allow not between, not in in query language
allow subqueries beginning with a from clause in query language
Index: index.html
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/doc/reference/html_single/index.html,v
retrieving revision 1.80
retrieving revision 1.81
diff -C2 -d -r1.80 -r1.81
*** index.html 19 Nov 2002 10:42:17 -0000 1.80
--- index.html 19 Nov 2002 15:35:35 -0000 1.81
***************
*** 2695,2712 ****
Java <tt>public static final</tt> constants <tt>eg.Color.TABBY</tt>
</p></li></ul></div><p>
! <tt>in</tt> and <tt>between</tt>
! may be used as follows:
</p><pre class="programlisting">from cat in class eg.DomesticCat where cat.name between 'A' and 'B'
from cat in class eg.DomesticCat where cat.name in ( 'Foo', 'Bar', Baz" )</pre><p>
! but the negated forms should be written
! </p><pre class="programlisting">from cat in class eg.DomesticCat where not cat.name between 'A' and 'B'
!
! from cat in class eg.DomesticCat where not cat.name in ( 'Foo', 'Bar', Baz" )</pre><p>
! rather than
! </p><pre class="programlisting">from cat in class eg.DomesticCat where cat.name not between 'A' and 'B' (Error)
! from cat in class eg.DomesticCat where cat.name not in ( 'Foo', 'Bar', Baz" ) (Error)</pre><p>
! However, both <tt>is null</tt> and <tt>is not null</tt> may be used to test
for null values.
</p><p>
--- 2695,2707 ----
Java <tt>public static final</tt> constants <tt>eg.Color.TABBY</tt>
</p></li></ul></div><p>
! <tt>in</tt> and <tt>between</tt> may be used as follows:
</p><pre class="programlisting">from cat in class eg.DomesticCat where cat.name between 'A' and 'B'
from cat in class eg.DomesticCat where cat.name in ( 'Foo', 'Bar', Baz" )</pre><p>
! and the negated forms may be written
! </p><pre class="programlisting">from cat in class eg.DomesticCat where cat.name not between 'A' and 'B'
! from cat in class eg.DomesticCat where cat.name not in ( 'Foo', 'Bar', Baz" )</pre><p>
! Likewise, <tt>is null</tt> and <tt>is not null</tt> may be used to test
for null values.
</p><p>
***************
*** 2809,2813 ****
from cat in class eg.DomesticCat where cat.name =
! some( select list.name from list in class eg.NameList )</pre></div></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="transactions"></a>Chapter 8. Transactions And Concurrency</h2></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt>8.1. <a href="#transactions-s1">Datastores, Sessions and Factories</a></dt><dt>8.2. <a href="#transactions-s3">Threads and connections</a></dt><dt>8.3. <a href="#transactions-s5">Optimistic Locking / Versioning</a></dt><dd><dl><dt>8.3.1. <a href="#transactions-s5-1">Long session with automatic versioning</a></dt><dt>8.3.2. <a href="#transactions-s5-2">Many sessions with automatic versioning</a></dt><dt>8.3.3. <a href="#transactions-s5-3">Application version checking</a></dt></dl></dd><dt>8.4. <a href="#transactions-s2">Session disconnection</a></dt><dt>8.5. <a href="#transactions-s4">Pessimistic Locking</a></dt></dl></div><p>
Hibernate is not itself a database. It is a lightweight object-relational
mapping tool. Transaction management is delegated to the underlying database
--- 2804,2811 ----
from cat in class eg.DomesticCat where cat.name =
! some( select list.name from list in class eg.NameList )
!
! from cat in class eg.Cat where not exists
! ( from mate in class eg.Cat where mate.mate = cat )</pre></div></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="transactions"></a>Chapter 8. Transactions And Concurrency</h2></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt>8.1. <a href="#transactions-s1">Datastores, Sessions and Factories</a></dt><dt>8.2. <a href="#transactions-s3">Threads and connections</a></dt><dt>8.3. <a href="#transactions-s5">Optimistic Locking / Versioning</a></dt><dd><dl><dt>8.3.1. <a href="#transactions-s5-1">Long session with automatic versioning</a></dt><dt>8.3.2. <a href="#transactions-s5-2">Many sessions with automatic versioning</a></dt><dt>8.3.3. <a href="#transactions-s5-3">Application version checking</a></dt></dl></dd><dt>8.4. <a href="#transactions-s2">Session disconnection</a></dt><dt>8.5. <a href="#transactions-s4">Pessimistic Locking</a></dt></dl></div><p>
Hibernate is not itself a database. It is a lightweight object-relational
mapping tool. Transaction management is delegated to the underlying database
|
|
From: <one...@us...> - 2002-11-19 15:35:38
|
Update of /cvsroot/hibernate/Hibernate In directory sc8-pr-cvs1:/tmp/cvs-serv2395 Modified Files: changelog.txt Log Message: allow not between, not in in query language allow subqueries beginning with a from clause in query language Index: changelog.txt =================================================================== RCS file: /cvsroot/hibernate/Hibernate/changelog.txt,v retrieving revision 1.266 retrieving revision 1.267 diff -C2 -d -r1.266 -r1.267 *** changelog.txt 19 Nov 2002 10:42:17 -0000 1.266 --- changelog.txt 19 Nov 2002 15:35:35 -0000 1.267 *************** *** 7,10 **** --- 7,12 ---- * fixed an exception that occurred with short qualified tablenames * added the polymorphism attribute to the <class> element + * allow "not between", "not in" in query language + * allow subqueries beginning with a from clause in query language Changes in version 1.2 beta 2 (15.11.2002) |
|
From: <one...@us...> - 2002-11-19 15:35:38
|
Update of /cvsroot/hibernate/Hibernate/doc/reference/html
In directory sc8-pr-cvs1:/tmp/cvs-serv2395/doc/reference/html
Modified Files:
query-language.html
Log Message:
allow not between, not in in query language
allow subqueries beginning with a from clause in query language
Index: query-language.html
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/doc/reference/html/query-language.html,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** query-language.html 28 Oct 2002 15:41:54 -0000 1.20
--- query-language.html 19 Nov 2002 15:35:35 -0000 1.21
***************
*** 152,169 ****
Java <tt>public static final</tt> constants <tt>eg.Color.TABBY</tt>
</p></li></ul></div><p>
! <tt>in</tt> and <tt>between</tt>
! may be used as follows:
</p><pre class="programlisting">from cat in class eg.DomesticCat where cat.name between 'A' and 'B'
from cat in class eg.DomesticCat where cat.name in ( 'Foo', 'Bar', Baz" )</pre><p>
! but the negated forms should be written
! </p><pre class="programlisting">from cat in class eg.DomesticCat where not cat.name between 'A' and 'B'
!
! from cat in class eg.DomesticCat where not cat.name in ( 'Foo', 'Bar', Baz" )</pre><p>
! rather than
! </p><pre class="programlisting">from cat in class eg.DomesticCat where cat.name not between 'A' and 'B' (Error)
! from cat in class eg.DomesticCat where cat.name not in ( 'Foo', 'Bar', Baz" ) (Error)</pre><p>
! However, both <tt>is null</tt> and <tt>is not null</tt> may be used to test
for null values.
</p><p>
--- 152,164 ----
Java <tt>public static final</tt> constants <tt>eg.Color.TABBY</tt>
</p></li></ul></div><p>
! <tt>in</tt> and <tt>between</tt> may be used as follows:
</p><pre class="programlisting">from cat in class eg.DomesticCat where cat.name between 'A' and 'B'
from cat in class eg.DomesticCat where cat.name in ( 'Foo', 'Bar', Baz" )</pre><p>
! and the negated forms may be written
! </p><pre class="programlisting">from cat in class eg.DomesticCat where cat.name not between 'A' and 'B'
! from cat in class eg.DomesticCat where cat.name not in ( 'Foo', 'Bar', Baz" )</pre><p>
! Likewise, <tt>is null</tt> and <tt>is not null</tt> may be used to test
for null values.
</p><p>
***************
*** 266,268 ****
from cat in class eg.DomesticCat where cat.name =
! some( select list.name from list in class eg.NameList )</pre></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="manipulating-data.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="transactions.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 6. Manipulating Persistent Data </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 8. Transactions And Concurrency</td></tr></table></div></body></html>
\ No newline at end of file
--- 261,266 ----
from cat in class eg.DomesticCat where cat.name =
! some( select list.name from list in class eg.NameList )
!
! from cat in class eg.Cat where not exists
! ( from mate in class eg.Cat where mate.mate = cat )</pre></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="manipulating-data.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="transactions.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 6. Manipulating Persistent Data </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 8. Transactions And Concurrency</td></tr></table></div></body></html>
\ No newline at end of file
|
|
From: <one...@us...> - 2002-11-19 15:28:38
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/loader In directory sc8-pr-cvs1:/tmp/cvs-serv373/hibernate/loader Modified Files: Loader.java Log Message: allow not between, not in in query language allow subqueries beginning with a from clause in query language Index: Loader.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/loader/Loader.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** Loader.java 7 Nov 2002 11:33:48 -0000 1.26 --- Loader.java 19 Nov 2002 15:28:06 -0000 1.27 *************** *** 235,239 **** if ( !persisters[i].getMappedClass().isAssignableFrom( object.getClass() ) ) ! throw new WrongClassException( "given object was of wrong class", key.getIdentifier(), persisters[i].getMappedClass() ); } --- 235,239 ---- if ( !persisters[i].getMappedClass().isAssignableFrom( object.getClass() ) ) ! throw new WrongClassException( "loaded object was of wrong class", key.getIdentifier(), persisters[i].getMappedClass() ); } *************** *** 492,494 **** --- 492,495 ---- return buf.toString(); } + } |