You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(22) |
Nov
(308) |
Dec
(131) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(369) |
Feb
(171) |
Mar
(236) |
Apr
(187) |
May
(218) |
Jun
(217) |
Jul
(127) |
Aug
(448) |
Sep
(270) |
Oct
(231) |
Nov
(422) |
Dec
(255) |
| 2004 |
Jan
(111) |
Feb
(73) |
Mar
(338) |
Apr
(351) |
May
(349) |
Jun
(495) |
Jul
(394) |
Aug
(1048) |
Sep
(499) |
Oct
(142) |
Nov
(269) |
Dec
(638) |
| 2005 |
Jan
(825) |
Feb
(1272) |
Mar
(593) |
Apr
(690) |
May
(950) |
Jun
(958) |
Jul
(767) |
Aug
(839) |
Sep
(525) |
Oct
(449) |
Nov
(585) |
Dec
(455) |
| 2006 |
Jan
(603) |
Feb
(656) |
Mar
(195) |
Apr
(114) |
May
(136) |
Jun
(100) |
Jul
(128) |
Aug
(68) |
Sep
(7) |
Oct
(1) |
Nov
(1) |
Dec
(8) |
| 2007 |
Jan
(4) |
Feb
(3) |
Mar
(8) |
Apr
(16) |
May
(5) |
Jun
(4) |
Jul
(6) |
Aug
(23) |
Sep
(15) |
Oct
(5) |
Nov
(7) |
Dec
(5) |
| 2008 |
Jan
(5) |
Feb
(1) |
Mar
(1) |
Apr
(5) |
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(2) |
| 2013 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
| 2015 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <one...@us...> - 2002-12-26 03:37:08
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/map
In directory sc8-pr-cvs1:/tmp/cvs-serv22482/hibernate/map
Added Files:
UniqueKey.java
Log Message:
support for multi-column unique constraints via unique-key attribute
--- NEW FILE: UniqueKey.java ---
//$Id: UniqueKey.java,v 1.1 2002/12/26 03:37:01 oneovthafew Exp $
package cirrus.hibernate.map;
import java.util.Iterator;
import cirrus.hibernate.helpers.StringHelper;
import cirrus.hibernate.sql.Dialect;
public class UniqueKey extends Constraint {
public String sqlConstraintString(Dialect d) {
StringBuffer buf = new StringBuffer(" unique (");
Iterator iter = getColumnIterator();
while ( iter.hasNext() ) {
buf.append( ( (Column) iter.next() ).getName() );
if ( iter.hasNext() ) buf.append(", ");
}
return buf.append(")").toString();
}
public String sqlConstraintString(Dialect d, String constraintName) {
StringBuffer buf = new StringBuffer(
d.getAddPrimaryKeyConstraintString(constraintName)
).append('(');
Iterator iter = getColumnIterator();
while ( iter.hasNext() ) {
buf.append( ( (Column) iter.next() ).getName() );
if ( iter.hasNext() ) buf.append(", ");
}
return StringHelper.replace( buf.append(")").toString(), "primary key", "unique" ); //TODO: improve this hack!
}
}
|
|
From: <one...@us...> - 2002-12-26 03:35:11
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/test
In directory sc8-pr-cvs1:/tmp/cvs-serv22091/hibernate/test
Modified Files:
Foo.java FooBar.hbm.xml FooBarTest.java
Log Message:
support for multi-column unique constraints via unique-key attribute
Index: Foo.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/Foo.java,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** Foo.java 5 Nov 2002 03:44:02 -0000 1.37
--- Foo.java 26 Dec 2002 03:35:08 -0000 1.38
***************
*** 12,15 ****
--- 12,17 ----
public class Foo implements Lifecycle, FooProxy, Serializable {
+ private static int count=0;
+
public static class Struct implements java.io.Serializable {
String name;
***************
*** 65,69 ****
_timestamp = new Date( System.currentTimeMillis() );
_integer = new Integer( -666 );
! _long = new Long( 696969696969696969l );
_short = new Short("42");
_float = new Float( 6666.66f );
--- 67,71 ----
_timestamp = new Date( System.currentTimeMillis() );
_integer = new Integer( -666 );
! _long = new Long( 696969696969696969l - count++ );
_short = new Short("42");
_float = new Float( 6666.66f );
Index: FooBar.hbm.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/FooBar.hbm.xml,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** FooBar.hbm.xml 20 Nov 2002 10:30:45 -0000 1.17
--- FooBar.hbm.xml 26 Dec 2002 03:35:08 -0000 1.18
***************
*** 44,51 ****
</many-to-one>
<property name="long">
! <column name="long_" index="fbmtoidx"/>
</property>
- <property name="integer" column="integer_"/>
- <property name="float" column="float_"/>
<property name="double" column="double_"/>
<collection name="bytes" role="foo_bytes"/>
--- 44,55 ----
</many-to-one>
<property name="long">
! <column name="long_" index="fbmtoidx" unique-key="abc"/>
! </property>
! <property name="integer">
! <column name="integer_" unique-key="abc"/>
! </property>
! <property name="float">
! <column name="float_" unique-key="abc"/>
</property>
<property name="double" column="double_"/>
<collection name="bytes" role="foo_bytes"/>
Index: FooBarTest.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/FooBarTest.java,v
retrieving revision 1.234
retrieving revision 1.235
diff -C2 -d -r1.234 -r1.235
*** FooBarTest.java 25 Dec 2002 04:36:31 -0000 1.234
--- FooBarTest.java 26 Dec 2002 03:35:08 -0000 1.235
***************
*** 840,844 ****
assertTrue( ( (Integer) rs.next() ).intValue()==2, "count" );
assertTrue( !rs.hasNext() );
! rs = s.iterate("select count(*), foo.long from foo in class cirrus.hibernate.test.Foo group by foo.long");
assertTrue( ( (Object[]) rs.next() )[0].equals( new Integer(3) ), "count(*) group by" );
assertTrue( !rs.hasNext() );
--- 840,844 ----
assertTrue( ( (Integer) rs.next() ).intValue()==2, "count" );
assertTrue( !rs.hasNext() );
! rs = s.iterate("select count(*), foo.int from foo in class cirrus.hibernate.test.Foo group by foo.int");
assertTrue( ( (Object[]) rs.next() )[0].equals( new Integer(3) ), "count(*) group by" );
assertTrue( !rs.hasNext() );
***************
*** 1692,1696 ****
assertTrue( row[0].equals( foo.getFoo().getKey() ), "multi-column id" );
assertTrue( row[1].equals( foo.getKey() ), "multi-column id" );
! assertTrue( row[2].equals( new Long(696969696969696969l) ), "multi-column property" );
assertTrue( !rs.hasNext() );
--- 1692,1696 ----
assertTrue( row[0].equals( foo.getFoo().getKey() ), "multi-column id" );
assertTrue( row[1].equals( foo.getKey() ), "multi-column id" );
! assertTrue( row[2].equals( foo.getFoo().getLong() ), "multi-column property" );
assertTrue( !rs.hasNext() );
***************
*** 1700,1704 ****
foo.getFoo().getKey().equals( row[0] ) &&
foo.getKey().equals( row[1] ) &&
! new Long(696969696969696969l).equals( row[2] ) &&
row[3] == foo.getFoo() &&
row[3]==row[4]
--- 1700,1704 ----
foo.getFoo().getKey().equals( row[0] ) &&
foo.getKey().equals( row[1] ) &&
! foo.getFoo().getLong().equals( row[2] ) &&
row[3] == foo.getFoo() &&
row[3]==row[4]
|
|
From: <one...@us...> - 2002-12-26 03:35:11
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/map
In directory sc8-pr-cvs1:/tmp/cvs-serv22091/hibernate/map
Modified Files:
Constraint.java Subclass.java Table.java Value.java
Log Message:
support for multi-column unique constraints via unique-key attribute
Index: Constraint.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/map/Constraint.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** Constraint.java 14 Dec 2002 09:27:55 -0000 1.10
--- Constraint.java 26 Dec 2002 03:35:07 -0000 1.11
***************
*** 21,25 ****
}
public void addColumn(Column column) {
! if (!columns.contains(column)) columns.add(column);
}
public int getColumnSpan() {
--- 21,25 ----
}
public void addColumn(Column column) {
! if ( !columns.contains(column) ) columns.add(column);
}
public int getColumnSpan() {
Index: Subclass.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/map/Subclass.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** Subclass.java 25 Dec 2002 04:16:36 -0000 1.23
--- Subclass.java 26 Dec 2002 03:35:07 -0000 1.24
***************
*** 136,140 ****
}
! ForeignKey fk = mytable.getForeignKey( key.getConstraintColumns() );
fk.setReferencedClass( superclass.getPersistentClass() );
--- 136,140 ----
}
! ForeignKey fk = mytable.createForeignKey( key.getConstraintColumns() );
fk.setReferencedClass( superclass.getPersistentClass() );
Index: Table.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/map/Table.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** Table.java 25 Dec 2002 04:16:36 -0000 1.33
--- Table.java 26 Dec 2002 03:35:07 -0000 1.34
***************
*** 27,30 ****
--- 27,31 ----
private Map indexes = new HashMap();
private Map foreignKeys = new HashMap();
+ private Map uniqueKeys = new HashMap();
private final int uniqueInteger;
private static int tableCounter=0;
***************
*** 71,87 ****
return foreignKeys.values().iterator();
}
public String sqlAlterString(Dialect dialect,Mapping p,JdbcTableInfo tableInfo) throws HibernateException {
- // String pkname = null;
- // // Try to find out the name of the primary key to create it as identity if the NativeGenerator is used
- // boolean createIdentity;
- // if (primaryKey != null) {
- // createIdentity = dialect.supportsIdentityColumns() && ( identifierGenerator instanceof NativeGenerator );
- // pkname = ( (Column) primaryKey.getColumnIterator().next() ).getName();
- // }
- // else
- // createIdentity = false;
-
Iterator iter=columnIterator();
StringBuffer buf=new StringBuffer(50);
--- 72,81 ----
return foreignKeys.values().iterator();
}
+ public Iterator uniqueKeyIterator() {
+ return uniqueKeys.values().iterator();
+ }
public String sqlAlterString(Dialect dialect,Mapping p,JdbcTableInfo tableInfo) throws HibernateException {
Iterator iter=columnIterator();
StringBuffer buf=new StringBuffer(50);
***************
*** 161,164 ****
--- 155,165 ----
}
}
+ if ( dialect.supportsUnique() ) {
+ Iterator ukiter = uniqueKeyIterator();
+ while ( ukiter.hasNext() ) {
+ UniqueKey uk = (UniqueKey) ukiter.next();
+ buf.append(',').append( uk.sqlConstraintString(dialect) );
+ }
+ }
buf.append(")");
***************
*** 184,189 ****
}
! public Index getIndex(String name)
! {
Index index = (Index)indexes.get(name);
--- 185,189 ----
}
! public Index getIndex(String name) {
Index index = (Index)indexes.get(name);
***************
*** 197,202 ****
return index;
}
! public ForeignKey getForeignKey(List columns) {
String name = "FK" + uniqueColumnString( columns.iterator() );
--- 197,215 ----
return index;
}
+
+ public UniqueKey getUniqueKey(String name) {
! UniqueKey uk = (UniqueKey) uniqueKeys.get(name);
!
! if (uk == null) {
! uk = new UniqueKey();
! uk.setName(name);
! uk.setTable(this);
! uniqueKeys.put(name, uk);
! }
! return uk;
! }
!
! public ForeignKey createForeignKey(List columns) {
String name = "FK" + uniqueColumnString( columns.iterator() );
Index: Value.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/map/Value.java,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** Value.java 25 Dec 2002 04:16:36 -0000 1.44
--- Value.java 26 Dec 2002 03:35:07 -0000 1.45
***************
*** 88,91 ****
--- 88,96 ----
table.getIndex(iname).addColumn(col);
}
+ Node uniqueNode = subnode.getAttributes().getNamedItem("unique-key");
+ if ( uniqueNode!=null && table!=null ) { //TODO: what do you do about associations?? (second pass compile)
+ String iname = uniqueNode.getNodeValue();
+ table.getUniqueKey(iname).addColumn(col);
+ }
}
}
***************
*** 105,109 ****
public void createForeignKeyOfClass(Root root, Table table, Class persistentClass) {
//foreign key
! ForeignKey fk = table.getForeignKey( getConstraintColumns() );
fk.setReferencedClass(persistentClass);
}
--- 110,114 ----
public void createForeignKeyOfClass(Root root, Table table, Class persistentClass) {
//foreign key
! ForeignKey fk = table.createForeignKey( getConstraintColumns() );
fk.setReferencedClass(persistentClass);
}
|
|
From: <one...@us...> - 2002-12-26 03:35:10
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/impl
In directory sc8-pr-cvs1:/tmp/cvs-serv22091/hibernate/impl
Modified Files:
DatastoreImpl.java
Log Message:
support for multi-column unique constraints via unique-key attribute
Index: DatastoreImpl.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/impl/DatastoreImpl.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** DatastoreImpl.java 14 Dec 2002 09:27:55 -0000 1.23
--- DatastoreImpl.java 26 Dec 2002 03:35:07 -0000 1.24
***************
*** 224,243 ****
iter = getTableMaps();
! while (iter.hasNext()) {
! Table table = (Table)iter.next();
Iterator subIter;
! if (dialect.hasAlterTable()) {
subIter = table.foreignKeyIterator();
! while (subIter.hasNext()) {
! ForeignKey fk = (ForeignKey)subIter.next();
! script.add(fk.sqlCreateString(dialect, this));
}
}
subIter = table.indexIterator();
! while (subIter.hasNext()) {
! Index index = (Index)subIter.next();
! script.add(index.sqlCreateString(dialect, this));
}
}
--- 224,243 ----
iter = getTableMaps();
! while ( iter.hasNext() ) {
! Table table = (Table) iter.next();
Iterator subIter;
! if ( dialect.hasAlterTable() ) {
subIter = table.foreignKeyIterator();
! while ( subIter.hasNext() ) {
! ForeignKey fk = (ForeignKey) subIter.next();
! script.add( fk.sqlCreateString(dialect, this) );
}
}
subIter = table.indexIterator();
! while ( subIter.hasNext() ) {
! Index index = (Index) subIter.next();
! script.add( index.sqlCreateString(dialect, this) );
}
}
|
|
From: <one...@us...> - 2002-12-26 03:35:10
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate
In directory sc8-pr-cvs1:/tmp/cvs-serv22091/hibernate
Modified Files:
hibernate-mapping-1.1.dtd hibernate-mapping.dtd
Log Message:
support for multi-column unique constraints via unique-key attribute
Index: hibernate-mapping-1.1.dtd
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/hibernate-mapping-1.1.dtd,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** hibernate-mapping-1.1.dtd 21 Nov 2002 07:51:17 -0000 1.13
--- hibernate-mapping-1.1.dtd 26 Dec 2002 03:35:07 -0000 1.14
***************
*** 370,373 ****
--- 370,374 ----
<!ATTLIST column not-null (true|false) #IMPLIED> <!-- default: false (except for id properties) -->
<!ATTLIST column unique (true|false) #IMPLIED> <!-- default: false (except for id properties) -->
+ <!ATTLIST column unique-key CDATA #IMPLIED> <!-- default: no unique key -->
<!ATTLIST column sql-type CDATA #IMPLIED> <!-- override default column type for hibernate type -->
<!ATTLIST column index CDATA #IMPLIED>
Index: hibernate-mapping.dtd
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/hibernate-mapping.dtd,v
retrieving revision 1.82
retrieving revision 1.83
diff -C2 -d -r1.82 -r1.83
*** hibernate-mapping.dtd 19 Nov 2002 15:28:05 -0000 1.82
--- hibernate-mapping.dtd 26 Dec 2002 03:35:07 -0000 1.83
***************
*** 1,349 ****
! <?xml version='1.0' encoding='utf-8'?>
!
! <!-- Hibernate Mapping DTD.
!
! <!DOCTYPE hibernate-mapping PUBLIC
! "-//Hibernate/Hibernate Mapping DTD//EN"
! "http://hibernate.sourceforge.net/hibernate-mapping.dtd">
!
! An instance of this XML document may contain mappings for an arbitrary
! number of classes. The class mappings may contain associations to classes
! mapped in the same document or in another document. No class may be
! mapped more than once. Each document may also contains mappings for an
! arbitrary number of toplevel collections. Toplevel collection roles may
! 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)*,
! class*,
! query*
! )>
! <!ATTLIST hibernate-mapping schema CDATA #IMPLIED> <!-- default: none -->
! <!ATTLIST hibernate-mapping default-cascade CDATA #IMPLIED> <!-- none|save/update|all, default: none -->
!
! <!-- Root of an entity class hierarchy. Entities have their own tables. -->
!
! <!ELEMENT class (
! jcs-cache?,
! (id|composite-id),
! discriminator?,
! (version|timestamp)?,
! (property|many-to-one|one-to-one|collection|component|map|set|list|bag|array|primitive-array)*,
! 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 CDATA #IMPLIED> <!-- default: true -->
! <!ATTLIST class persister CDATA #IMPLIED> <!-- default: cirrus.hibernate.persister.EntityPersister -->
! <!ATTLIST class polymorphism CDATA #IMPLIED> <!-- implicit | explicit, default: implicit -->
! <!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>
! <!ATTLIST id column CDATA #IMPLIED>
! <!ATTLIST id type CDATA #IMPLIED>
! <!ATTLIST id length CDATA #IMPLIED>
! <!ATTLIST id unsaved-value CDATA #IMPLIED> <!-- any|none|null|"value", default: any -->
!
! <!-- 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 (property+)>
! <!ATTLIST composite-id class CDATA #IMPLIED>
! <!ATTLIST composite-id name CDATA #IMPLIED>
! <!ATTLIST composite-id unsaved-value CDATA #IMPLIED> <!-- any|none|null, 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 #IMPLIED> <!-- default: string -->
! <!ATTLIST discriminator length CDATA #IMPLIED> <!-- default: 100 -->
!
! <!-- 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 #IMPLIED> <!-- default: 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)*,
! subclass*
! )>
! <!ATTLIST subclass name CDATA #REQUIRED>
! <!ATTLIST subclass proxy CDATA #IMPLIED> <!-- default: no proxy interface -->
!
! <!ATTLIST subclass discriminator-value CDATA #IMPLIED> <!-- default: unqualified class name | none -->
!
! <!-- 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>
! <!ATTLIST property type CDATA #IMPLIED>
! <!ATTLIST property column CDATA #IMPLIED>
! <!ATTLIST property length CDATA #IMPLIED>
! <!ATTLIST property not-null CDATA #IMPLIED>
! <!ATTLIST property unique CDATA #IMPLIED>
!
! <!-- 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>
! <!ATTLIST many-to-one class CDATA #IMPLIED>
! <!ATTLIST many-to-one column CDATA #IMPLIED>
! <!ATTLIST many-to-one length CDATA #IMPLIED> <!-- DEPRECATED -->
! <!ATTLIST many-to-one not-null CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST many-to-one unique CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST many-to-one cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
! <!ATTLIST many-to-one outer-join CDATA #IMPLIED> <!-- true|false, default to hibernate.use_outer_join -->
!
! <!-- 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>
! <!ATTLIST one-to-one class CDATA #IMPLIED>
! <!ATTLIST one-to-one cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
! <!ATTLIST one-to-one outer-join CDATA #IMPLIED> <!-- true|false, default to hibernate.use_outer_join -->
! <!ATTLIST one-to-one constrained CDATA #IMPLIED> <!-- true|false, default: false -->
!
! <!-- Declared a property that holds instances of a toplevel collection role. -->
!
! <!ELEMENT collection (column*)>
! <!ATTLIST collection name CDATA #REQUIRED>
! <!ATTLIST collection role CDATA #IMPLIED>
! <!ATTLIST collection column CDATA #IMPLIED>
! <!ATTLIST collection length CDATA #IMPLIED>
! <!ATTLIST collection not-null CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST collection unique CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST collection cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, 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
! mapped to columns of the table of the containing entity. A null component reference
! is mapped to null values in all columns and vice versa. Components do not support
! shared reference semantics. -->
!
! <!ELEMENT component (
! parent?,
! (property|many-to-one|one-to-one|collection|component|map|set|list|bag|array|primitive-array)*
! )>
! <!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
! nested inside a class declaration indicate a foreign key relationship from the
! collection table to the enclosing class. For toplevel collections, the name of
! 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?,
! key,
! index,
! (element|one-to-many|many-to-many|subcollection|composite-element)
! )>
! <!ATTLIST map role CDATA #REQUIRED>
! <!ATTLIST map table CDATA #IMPLIED> <!-- default: rolename -->
! <!ATTLIST map schema CDATA #IMPLIED> <!-- default: none -->
! <!ATTLIST map lazy CDATA #IMPLIED> <!-- default: false -->
! <!ATTLIST map sort CDATA #IMPLIED> <!-- unsorted|natural, default: unsorted -->
! <!ATTLIST map cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
! <!ATTLIST map order-by CDATA #IMPLIED> <!-- default: none -->
!
! <!ELEMENT set (
! jcs-cache?,
! key,
! (element|one-to-many|many-to-many|subcollection|composite-element)
! )>
! <!ATTLIST set role CDATA #REQUIRED>
! <!ATTLIST set table CDATA #IMPLIED> <!-- default: rolename -->
! <!ATTLIST set schema CDATA #IMPLIED> <!-- default: none -->
! <!ATTLIST set lazy CDATA #IMPLIED> <!-- default: false -->
! <!ATTLIST set sort CDATA #IMPLIED> <!-- unsorted|natural, default: unsorted -->
! <!ATTLIST set readonly CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST set cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
! <!ATTLIST set order-by CDATA #IMPLIED> <!-- default: none -->
!
! <!ELEMENT bag (
! jcs-cache?,
! key,
! (element|one-to-many|many-to-many|subcollection|composite-element)
! )>
! <!ATTLIST bag role CDATA #REQUIRED>
! <!ATTLIST bag table CDATA #IMPLIED> <!-- default: rolename -->
! <!ATTLIST bag schema CDATA #IMPLIED> <!-- default: none -->
! <!ATTLIST bag lazy CDATA #IMPLIED> <!-- default: false -->
! <!ATTLIST bag readonly CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST bag cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
! <!ATTLIST bag order-by CDATA #IMPLIED> <!-- default: none -->
!
! <!ELEMENT list (
! jcs-cache?,
! key,
! index,
! (element|one-to-many|many-to-many|subcollection|composite-element)
! )>
! <!ATTLIST list role CDATA #REQUIRED>
! <!ATTLIST list table CDATA #IMPLIED> <!-- default: rolename -->
! <!ATTLIST list schema CDATA #IMPLIED> <!-- default: none -->
! <!ATTLIST list lazy CDATA #IMPLIED> <!-- default: false -->
! <!ATTLIST list cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
!
! <!ELEMENT array (
! jcs-cache?,
! key,
! index,
! (element|one-to-many|many-to-many|subcollection|composite-element)
! )>
! <!ATTLIST array role CDATA #REQUIRED>
! <!ATTLIST array table CDATA #IMPLIED> <!-- default: rolename -->
! <!ATTLIST array schema CDATA #IMPLIED> <!-- default: none -->
! <!ATTLIST array element-class CDATA #IMPLIED>
! <!ATTLIST array cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, 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>
! <!ATTLIST element type CDATA #REQUIRED>
! <!ATTLIST element length CDATA #IMPLIED>
! <!ATTLIST element not-null CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST element unique CDATA #IMPLIED> <!-- true|false, default: 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>
! <!ATTLIST many-to-many column CDATA #IMPLIED>
! <!ATTLIST many-to-many length CDATA #IMPLIED> <!-- DEPRECATED -->
! <!ATTLIST many-to-many not-null CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST many-to-many outer-join CDATA #IMPLIED> <!-- true|false, default to hibernate.use_outer_join -->
! <!-- unique makes no sense here since it would mean a 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>
! <!ATTLIST subcollection role CDATA #REQUIRED>
! <!ATTLIST subcollection length CDATA #IMPLIED>
! <!ATTLIST subcollection not-null CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST subcollection unique CDATA #IMPLIED> <!-- true|false, default: 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)*
! )>
! <!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 (generator?, column*)>
! <!ATTLIST key column CDATA #IMPLIED>
! <!ATTLIST key type CDATA #IMPLIED>
! <!ATTLIST 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 #REQUIRED>
! <!ATTLIST index type CDATA #IMPLIED>
! <!ATTLIST index length CDATA #IMPLIED>
!
! <!-- 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>
! <!ATTLIST column length CDATA #IMPLIED> <!-- default: 255 -->
! <!ATTLIST column not-null CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST column unique CDATA #IMPLIED> <!-- true|false, default: false -->
! <!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 CDATA #REQUIRED> <!-- read-only | read-write -->
!
! <!-- The cache element enables caching of an entity class.
! semi-deprecated - use a jcs-cache. -->
! <!ELEMENT cache EMPTY>
! <!ATTLIST cache timeout CDATA #IMPLIED> <!-- default: never expire -->
! <!ATTLIST cache impl-class CDATA #IMPLIED> <!-- default: hashbelt -->
! <!ATTLIST cache type CDATA #REQUIRED> <!-- readonly | readwrite -->
!
! <!-- The query element declares a named Hibernate query string -->
!
! <!ELEMENT query (#PCDATA)>
! <!ATTLIST query name CDATA #REQUIRED>
--- 1,350 ----
! <?xml version='1.0' encoding='utf-8'?>
!
! <!-- Hibernate Mapping DTD.
!
! <!DOCTYPE hibernate-mapping PUBLIC
! "-//Hibernate/Hibernate Mapping DTD//EN"
! "http://hibernate.sourceforge.net/hibernate-mapping.dtd">
!
! An instance of this XML document may contain mappings for an arbitrary
! number of classes. The class mappings may contain associations to classes
! mapped in the same document or in another document. No class may be
! mapped more than once. Each document may also contains mappings for an
! arbitrary number of toplevel collections. Toplevel collection roles may
! 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)*,
! class*,
! query*
! )>
! <!ATTLIST hibernate-mapping schema CDATA #IMPLIED> <!-- default: none -->
! <!ATTLIST hibernate-mapping default-cascade CDATA #IMPLIED> <!-- none|save/update|all, default: none -->
!
! <!-- Root of an entity class hierarchy. Entities have their own tables. -->
!
! <!ELEMENT class (
! jcs-cache?,
! (id|composite-id),
! discriminator?,
! (version|timestamp)?,
! (property|many-to-one|one-to-one|collection|component|map|set|list|bag|array|primitive-array)*,
! 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 CDATA #IMPLIED> <!-- default: true -->
! <!ATTLIST class persister CDATA #IMPLIED> <!-- default: cirrus.hibernate.persister.EntityPersister -->
! <!ATTLIST class polymorphism CDATA #IMPLIED> <!-- implicit | explicit, default: implicit -->
! <!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>
! <!ATTLIST id column CDATA #IMPLIED>
! <!ATTLIST id type CDATA #IMPLIED>
! <!ATTLIST id length CDATA #IMPLIED>
! <!ATTLIST id unsaved-value CDATA #IMPLIED> <!-- any|none|null|"value", default: any -->
!
! <!-- 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 (property+)>
! <!ATTLIST composite-id class CDATA #IMPLIED>
! <!ATTLIST composite-id name CDATA #IMPLIED>
! <!ATTLIST composite-id unsaved-value CDATA #IMPLIED> <!-- any|none|null, 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 #IMPLIED> <!-- default: string -->
! <!ATTLIST discriminator length CDATA #IMPLIED> <!-- default: 100 -->
!
! <!-- 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 #IMPLIED> <!-- default: 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)*,
! subclass*
! )>
! <!ATTLIST subclass name CDATA #REQUIRED>
! <!ATTLIST subclass proxy CDATA #IMPLIED> <!-- default: no proxy interface -->
!
! <!ATTLIST subclass discriminator-value CDATA #IMPLIED> <!-- default: unqualified class name | none -->
!
! <!-- 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>
! <!ATTLIST property type CDATA #IMPLIED>
! <!ATTLIST property column CDATA #IMPLIED>
! <!ATTLIST property length CDATA #IMPLIED>
! <!ATTLIST property not-null CDATA #IMPLIED>
! <!ATTLIST property unique CDATA #IMPLIED>
!
! <!-- 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>
! <!ATTLIST many-to-one class CDATA #IMPLIED>
! <!ATTLIST many-to-one column CDATA #IMPLIED>
! <!ATTLIST many-to-one length CDATA #IMPLIED> <!-- DEPRECATED -->
! <!ATTLIST many-to-one not-null CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST many-to-one unique CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST many-to-one cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
! <!ATTLIST many-to-one outer-join CDATA #IMPLIED> <!-- true|false, default to hibernate.use_outer_join -->
!
! <!-- 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>
! <!ATTLIST one-to-one class CDATA #IMPLIED>
! <!ATTLIST one-to-one cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
! <!ATTLIST one-to-one outer-join CDATA #IMPLIED> <!-- true|false, default to hibernate.use_outer_join -->
! <!ATTLIST one-to-one constrained CDATA #IMPLIED> <!-- true|false, default: false -->
!
! <!-- Declared a property that holds instances of a toplevel collection role. -->
!
! <!ELEMENT collection (column*)>
! <!ATTLIST collection name CDATA #REQUIRED>
! <!ATTLIST collection role CDATA #IMPLIED>
! <!ATTLIST collection column CDATA #IMPLIED>
! <!ATTLIST collection length CDATA #IMPLIED>
! <!ATTLIST collection not-null CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST collection unique CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST collection cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, 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
! mapped to columns of the table of the containing entity. A null component reference
! is mapped to null values in all columns and vice versa. Components do not support
! shared reference semantics. -->
!
! <!ELEMENT component (
! parent?,
! (property|many-to-one|one-to-one|collection|component|map|set|list|bag|array|primitive-array)*
! )>
! <!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
! nested inside a class declaration indicate a foreign key relationship from the
! collection table to the enclosing class. For toplevel collections, the name of
! 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?,
! key,
! index,
! (element|one-to-many|many-to-many|subcollection|composite-element)
! )>
! <!ATTLIST map role CDATA #REQUIRED>
! <!ATTLIST map table CDATA #IMPLIED> <!-- default: rolename -->
! <!ATTLIST map schema CDATA #IMPLIED> <!-- default: none -->
! <!ATTLIST map lazy CDATA #IMPLIED> <!-- default: false -->
! <!ATTLIST map sort CDATA #IMPLIED> <!-- unsorted|natural, default: unsorted -->
! <!ATTLIST map cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
! <!ATTLIST map order-by CDATA #IMPLIED> <!-- default: none -->
!
! <!ELEMENT set (
! jcs-cache?,
! key,
! (element|one-to-many|many-to-many|subcollection|composite-element)
! )>
! <!ATTLIST set role CDATA #REQUIRED>
! <!ATTLIST set table CDATA #IMPLIED> <!-- default: rolename -->
! <!ATTLIST set schema CDATA #IMPLIED> <!-- default: none -->
! <!ATTLIST set lazy CDATA #IMPLIED> <!-- default: false -->
! <!ATTLIST set sort CDATA #IMPLIED> <!-- unsorted|natural, default: unsorted -->
! <!ATTLIST set readonly CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST set cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
! <!ATTLIST set order-by CDATA #IMPLIED> <!-- default: none -->
!
! <!ELEMENT bag (
! jcs-cache?,
! key,
! (element|one-to-many|many-to-many|subcollection|composite-element)
! )>
! <!ATTLIST bag role CDATA #REQUIRED>
! <!ATTLIST bag table CDATA #IMPLIED> <!-- default: rolename -->
! <!ATTLIST bag schema CDATA #IMPLIED> <!-- default: none -->
! <!ATTLIST bag lazy CDATA #IMPLIED> <!-- default: false -->
! <!ATTLIST bag readonly CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST bag cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
! <!ATTLIST bag order-by CDATA #IMPLIED> <!-- default: none -->
!
! <!ELEMENT list (
! jcs-cache?,
! key,
! index,
! (element|one-to-many|many-to-many|subcollection|composite-element)
! )>
! <!ATTLIST list role CDATA #REQUIRED>
! <!ATTLIST list table CDATA #IMPLIED> <!-- default: rolename -->
! <!ATTLIST list schema CDATA #IMPLIED> <!-- default: none -->
! <!ATTLIST list lazy CDATA #IMPLIED> <!-- default: false -->
! <!ATTLIST list cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, default: none -->
!
! <!ELEMENT array (
! jcs-cache?,
! key,
! index,
! (element|one-to-many|many-to-many|subcollection|composite-element)
! )>
! <!ATTLIST array role CDATA #REQUIRED>
! <!ATTLIST array table CDATA #IMPLIED> <!-- default: rolename -->
! <!ATTLIST array schema CDATA #IMPLIED> <!-- default: none -->
! <!ATTLIST array element-class CDATA #IMPLIED>
! <!ATTLIST array cascade CDATA #IMPLIED> <!-- none|all|save/update|delete, 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>
! <!ATTLIST element type CDATA #REQUIRED>
! <!ATTLIST element length CDATA #IMPLIED>
! <!ATTLIST element not-null CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST element unique CDATA #IMPLIED> <!-- true|false, default: 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>
! <!ATTLIST many-to-many column CDATA #IMPLIED>
! <!ATTLIST many-to-many length CDATA #IMPLIED> <!-- DEPRECATED -->
! <!ATTLIST many-to-many not-null CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST many-to-many outer-join CDATA #IMPLIED> <!-- true|false, default to hibernate.use_outer_join -->
! <!-- unique makes no sense here since it would mean a 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>
! <!ATTLIST subcollection role CDATA #REQUIRED>
! <!ATTLIST subcollection length CDATA #IMPLIED>
! <!ATTLIST subcollection not-null CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST subcollection unique CDATA #IMPLIED> <!-- true|false, default: 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)*
! )>
! <!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 (generator?, column*)>
! <!ATTLIST key column CDATA #IMPLIED>
! <!ATTLIST key type CDATA #IMPLIED>
! <!ATTLIST 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 #REQUIRED>
! <!ATTLIST index type CDATA #IMPLIED>
! <!ATTLIST index length CDATA #IMPLIED>
!
! <!-- 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>
! <!ATTLIST column length CDATA #IMPLIED> <!-- default: 255 -->
! <!ATTLIST column not-null CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST column unique CDATA #IMPLIED> <!-- true|false, default: false -->
! <!ATTLIST column unique-key CDATA #IMPLIED> <!-- default: no unique key -->
! <!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 CDATA #REQUIRED> <!-- read-only | read-write -->
!
! <!-- The cache element enables caching of an entity class.
! semi-deprecated - use a jcs-cache. -->
! <!ELEMENT cache EMPTY>
! <!ATTLIST cache timeout CDATA #IMPLIED> <!-- default: never expire -->
! <!ATTLIST cache impl-class CDATA #IMPLIED> <!-- default: hashbelt -->
! <!ATTLIST cache type CDATA #REQUIRED> <!-- readonly | readwrite -->
!
! <!-- The query element declares a named Hibernate query string -->
!
! <!ELEMENT query (#PCDATA)>
! <!ATTLIST query name CDATA #REQUIRED>
|
|
From: <one...@us...> - 2002-12-26 01:23:18
|
Update of /cvsroot/hibernate/Hibernate In directory sc8-pr-cvs1:/tmp/cvs-serv30140 Removed Files: todo.txt Log Message: don't need todo.txt anymore --- todo.txt DELETED --- |
|
From: <one...@us...> - 2002-12-25 07:51:53
|
Update of /cvsroot/hibernate/Hibernate In directory sc8-pr-cvs1:/tmp/cvs-serv25861 Modified Files: readme.txt Log Message: changed version number Index: readme.txt =================================================================== RCS file: /cvsroot/hibernate/Hibernate/readme.txt,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** readme.txt 7 Dec 2002 09:47:22 -0000 1.55 --- readme.txt 25 Dec 2002 07:51:50 -0000 1.56 *************** *** 1,5 **** Hibernate - Relational Persistence for Idiomatic Java ===================================================== ! version 1.2 final 7 December 2002 Instructions --- 1,5 ---- Hibernate - Relational Persistence for Idiomatic Java ===================================================== ! version 1.2.1 xx December 2002 Instructions |
|
From: <one...@us...> - 2002-12-25 07:34:22
|
Update of /cvsroot/hibernate/Hibernate In directory sc8-pr-cvs1:/tmp/cvs-serv23867 Modified Files: changelog.txt Log Message: latest changes Index: changelog.txt =================================================================== RCS file: /cvsroot/hibernate/Hibernate/changelog.txt,v retrieving revision 1.288 retrieving revision 1.289 diff -C2 -d -r1.288 -r1.289 *** changelog.txt 15 Dec 2002 11:50:46 -0000 1.288 --- changelog.txt 25 Dec 2002 07:34:19 -0000 1.289 *************** *** 7,13 **** * support for WebSphere 5 (Venkat Srinivasan) * fixed a bug with query expressions of the form "foo.bar.id" for normalized mappings ! * experimental Blob/Clob support (Benoit Menendez) * improvements to SchemaUpdater (Benoit Menendez) * deprecated suspendFlushes() / resumeFlushes() in favor of FlushMode Changes in version 1.2 final (7.12.2002) --- 7,21 ---- * support for WebSphere 5 (Venkat Srinivasan) * fixed a bug with query expressions of the form "foo.bar.id" for normalized mappings ! * experimental Blob/Clob support (thanks to Benoit Menendez and Mark Woon) * improvements to SchemaUpdater (Benoit Menendez) * deprecated suspendFlushes() / resumeFlushes() in favor of FlushMode + * deprecated IDGenerationException in favor of IdentifierGenerationException + * fixed a bug introduced in 1.2 final where cascade save-update was sometimes ignored for readonly="true" bags + * fixed a bug caching null-valued one-to-one associations + * CodeGenerator now supports <bag> + * fixed problem with TimestampType on DB2 (Jonas) + * fixed a bug in generated SQL for collections with <joined-subclass> mappings (Robson Miranda) + * fixed a bug caching Maps (Benoit Menendez) + * SchemaExport now accepts a .jar file as a source of mappings Changes in version 1.2 final (7.12.2002) |
|
From: <one...@us...> - 2002-12-25 07:06:13
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate
In directory sc8-pr-cvs1:/tmp/cvs-serv20032/hibernate
Modified Files:
FlushMode.java
Log Message:
removed unnecessary code
Index: FlushMode.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/FlushMode.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** FlushMode.java 15 Dec 2002 10:51:31 -0000 1.1
--- FlushMode.java 25 Dec 2002 07:06:08 -0000 1.2
***************
*** 26,41 ****
}
/**
- * Does this mode flush more often than the given flush mode?
- */
- public boolean greaterThan(FlushMode mode) {
- return level > mode.level;
- }
- /**
- * Does this mode flush less often than the given flush mode?
- */
- public boolean lessThan(FlushMode mode) {
- return level < mode.level;
- }
- /**
* The <tt>Session</tt> is never flushed unless <tt>flush()</tt>
* is explicitly called by the application. This mode is very
--- 26,29 ----
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/id
In directory sc8-pr-cvs1:/tmp/cvs-serv18672/hibernate/id
Modified Files:
Assigned.java IDGenerationException.java
IdentifierGenerator.java
Added Files:
IdentifierGenerationException.java
Removed Files:
Adaptor.java IDGenerator.java
Log Message:
removed deprecated IDGenerator interface, renamedand improved the exception class
--- NEW FILE: IdentifierGenerationException.java ---
//$Id: IdentifierGenerationException.java,v 1.1 2002/12/25 06:57:57 oneovthafew Exp $
package cirrus.hibernate.id;
import cirrus.hibernate.*;
/**
* Thrown by <tt>IdentifierGenerator</tt> implementation class when
* ID generation fails.
*
* @see IdentifierGenerator
*/
public class IdentifierGenerationException extends HibernateException {
public IdentifierGenerationException(String msg) {
super(msg);
}
public IdentifierGenerationException(String msg, Throwable t) {
super(msg, t);
}
}
Index: Assigned.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/id/Assigned.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** Assigned.java 24 Nov 2002 11:00:36 -0000 1.11
--- Assigned.java 25 Dec 2002 06:57:57 -0000 1.12
***************
*** 19,27 ****
public Serializable generate(SessionImplementor session, Object obj) throws HibernateException {
! if (obj instanceof PersistentCollection) throw new IDGenerationException(
"Illegal use of assigned id generation for a toplevel collection"
);
final Serializable id = session.getPersister(obj).getIdentifier(obj);
! if (id==null) throw new IDGenerationException(
"ids for this class must be manually assigned before calling save(): " + obj.getClass().getName()
);
--- 19,27 ----
public Serializable generate(SessionImplementor session, Object obj) throws HibernateException {
! if (obj instanceof PersistentCollection) throw new IdentifierGenerationException(
"Illegal use of assigned id generation for a toplevel collection"
);
final Serializable id = session.getPersister(obj).getIdentifier(obj);
! if (id==null) throw new IdentifierGenerationException(
"ids for this class must be manually assigned before calling save(): " + obj.getClass().getName()
);
Index: IDGenerationException.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/id/IDGenerationException.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** IDGenerationException.java 25 Aug 2002 07:42:54 -0000 1.8
--- IDGenerationException.java 25 Dec 2002 06:57:57 -0000 1.9
***************
*** 2,19 ****
package cirrus.hibernate.id;
- import cirrus.hibernate.*;
-
/**
! * Thrown by <tt>IdentifierGenerator</tt> implementation class when
! * ID generation fails.
! *
! * @see IDGenerator
*/
!
! public class IDGenerationException extends HibernateException {
public IDGenerationException(String s) {
super(s);
}
!
}
--- 2,14 ----
package cirrus.hibernate.id;
/**
! * @deprecated use <tt>IdentifierGenerationException</tt>
! * @see IdentifierGenerationException
*/
! public class IDGenerationException extends IdentifierGenerationException {
public IDGenerationException(String s) {
super(s);
}
!
}
Index: IdentifierGenerator.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/id/IdentifierGenerator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** IdentifierGenerator.java 1 Oct 2002 01:25:29 -0000 1.2
--- IdentifierGenerator.java 25 Dec 2002 06:57:57 -0000 1.3
***************
*** 31,35 ****
* @return Serializable a new identifier
* @throws SQLException
! * @throws IDGenerationException
*/
public Serializable generate(SessionImplementor session, Object object) throws SQLException, HibernateException;
--- 31,35 ----
* @return Serializable a new identifier
* @throws SQLException
! * @throws IdentifierGenerationException
*/
public Serializable generate(SessionImplementor session, Object object) throws SQLException, HibernateException;
--- Adaptor.java DELETED ---
--- IDGenerator.java DELETED ---
|
|
From: <one...@us...> - 2002-12-25 06:58:00
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/map
In directory sc8-pr-cvs1:/tmp/cvs-serv18672/hibernate/map
Modified Files:
Root.java
Log Message:
removed deprecated IDGenerator interface, renamedand improved the exception class
Index: Root.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/map/Root.java,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** Root.java 14 Dec 2002 09:27:55 -0000 1.36
--- Root.java 25 Dec 2002 06:57:57 -0000 1.37
***************
*** 215,231 ****
IdentifierGenerator idgen;
Object gen = null;
! try {
! gen = idgenClass.getConstructor(argTypes).newInstance(args);
! } catch(NoSuchMethodException e) {
! throw new MappingException("Exception while trying to instantiate " + idgenClass.getName() + " with " + list,e);
! }
! if ( gen instanceof IDGenerator) {
! idgen = new Adaptor( (IDGenerator) gen );
}
! else {
! idgen = (IdentifierGenerator) gen;
}
- if ( PersistentIdentifierGenerator.class.isAssignableFrom(idgenClass) )
- generators.put( ( (PersistentIdentifierGenerator) idgen ).generatorKey(), idgen);
return idgen;
}
--- 215,230 ----
IdentifierGenerator idgen;
Object gen = null;
! try {
! gen = idgenClass.getConstructor(argTypes).newInstance(args);
}
! catch(NoSuchMethodException e) {
! throw new MappingException("Exception while trying to instantiate " + idgenClass.getName() + " with " + list,e);
! }
!
! idgen = (IdentifierGenerator) gen;
!
! if ( PersistentIdentifierGenerator.class.isAssignableFrom(idgenClass) ) {
! generators.put( ( (PersistentIdentifierGenerator) idgen ).generatorKey(), idgen );
}
return idgen;
}
|
|
From: <one...@us...> - 2002-12-25 06:47:15
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/type
In directory sc8-pr-cvs1:/tmp/cvs-serv17207/cirrus/hibernate/type
Modified Files:
NullableType.java PersistentCollectionType.java
Log Message:
logging in NullableType
Index: NullableType.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/type/NullableType.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** NullableType.java 1 Oct 2002 01:25:30 -0000 1.29
--- NullableType.java 25 Dec 2002 06:47:11 -0000 1.30
***************
*** 6,9 ****
--- 6,12 ----
import java.sql.SQLException;
+ import org.apache.commons.logging.Log;
+ import org.apache.commons.logging.LogFactory;
+
import cirrus.hibernate.HibernateException;
import cirrus.hibernate.engine.Mapping;
***************
*** 15,18 ****
--- 18,23 ----
*/
public abstract class NullableType extends AbstractType {
+
+ private static final Log log = LogFactory.getLog( Type.class.getPackage().getName() );
public abstract Object get(ResultSet rs, String name) throws HibernateException, SQLException;
***************
*** 26,33 ****
--- 31,45 ----
public final void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException {
+
if (value==null) {
+ if ( log.isTraceEnabled() )
+ LogFactory.getLog( getClass() ).trace("binding null to parameter: " + index);
+
st.setNull( index, sqlType() );
}
else {
+ if ( log.isTraceEnabled() )
+ LogFactory.getLog( getClass() ).trace("binding '" + toXML(value) + "' to parameter: " + index);
+
set(st, value, index);
}
***************
*** 45,51 ****
--- 57,65 ----
Object value = get(rs, name);
if ( value==null || rs.wasNull() ) {
+ if ( log.isTraceEnabled() ) LogFactory.getLog( getClass() ).trace("returning null as column: " + name);
return null;
}
else {
+ if ( log.isTraceEnabled() ) LogFactory.getLog( getClass() ).trace( "returning '" + toXML(value) + "' as column: " + name);
return value;
}
Index: PersistentCollectionType.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/type/PersistentCollectionType.java,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** PersistentCollectionType.java 13 Oct 2002 13:19:56 -0000 1.52
--- PersistentCollectionType.java 25 Dec 2002 06:47:11 -0000 1.53
***************
*** 17,21 ****
public abstract class PersistentCollectionType extends AbstractType implements AssociationType {
!
private final String role;
private static final int[] NO_INTS = {};
--- 17,21 ----
public abstract class PersistentCollectionType extends AbstractType implements AssociationType {
!
private final String role;
private static final int[] NO_INTS = {};
|
|
From: <one...@us...> - 2002-12-25 06:47:14
|
Update of /cvsroot/hibernate/Hibernate
In directory sc8-pr-cvs1:/tmp/cvs-serv17207
Modified Files:
log4j.properties
Log Message:
logging in NullableType
Index: log4j.properties
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/log4j.properties,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** log4j.properties 27 Sep 2002 09:45:58 -0000 1.13
--- log4j.properties 25 Dec 2002 06:47:11 -0000 1.14
***************
*** 1,5 ****
! # All hibernate log output of "info" level or higher goes to stdout.
! # For more verbose logging, change the "info" to "debug" on the last line.
!
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
--- 1,3 ----
! ### direct log messages to stdout ###
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
***************
*** 7,12 ****
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
log4j.rootLogger=warn, stdout
- log4j.logger.cirrus.hibernate.ps.PreparedStatementCache=info
log4j.logger.cirrus.hibernate=info
--- 5,23 ----
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+ ### direct messages to file hibernate.log ###
+ #log4j.appender.file=org.apache.log4j.FileAppender
+ #log4j.appender.file.File=hibernate.log
+ #log4j.appender.file.layout=org.apache.log4j.PatternLayout
+ #log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+
+ ### set log levels - for more verbose logging change 'info' to 'debug' ##
+
log4j.rootLogger=warn, stdout
log4j.logger.cirrus.hibernate=info
+
+ # log JDBC bind parameters
+ log4j.logger.cirrus.hibernate.type=info
+
+ # log prepared statement cache activity
+ log4j.logger.cirrus.hibernate.ps.PreparedStatementCache=info
|
|
From: <one...@us...> - 2002-12-25 06:47:14
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/test
In directory sc8-pr-cvs1:/tmp/cvs-serv17207/cirrus/hibernate/test
Modified Files:
MultiTableTest.java
Log Message:
logging in NullableType
Index: MultiTableTest.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/MultiTableTest.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** MultiTableTest.java 25 Dec 2002 04:36:31 -0000 1.19
--- MultiTableTest.java 25 Dec 2002 06:47:11 -0000 1.20
***************
*** 95,99 ****
s = sessions.openSession();
t = s.beginTransaction();
! Iterator iter = s.iterate("from s in class Simple where s.count>0");
boolean foundSimp = false;
boolean foundMulti = false;
--- 95,99 ----
s = sessions.openSession();
t = s.beginTransaction();
! Iterator iter = s.iterate("select\n\ns from s in class Simple where s.count>0");
boolean foundSimp = false;
boolean foundMulti = false;
|
|
From: <one...@us...> - 2002-12-25 04:44:05
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools/codegen
In directory sc8-pr-cvs1:/tmp/cvs-serv32157/hibernate/tools/codegen
Modified Files:
ClassMapping.java
Log Message:
added codegen support for <bag>
Index: ClassMapping.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools/codegen/ClassMapping.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** ClassMapping.java 7 Dec 2002 08:10:24 -0000 1.18
--- ClassMapping.java 25 Dec 2002 04:44:02 -0000 1.19
***************
*** 183,186 ****
--- 183,187 ----
doCollections(classElement, "map", "java.util.Map", "java.util.HashMap");
doCollections(classElement, "set", "java.util.Set", "java.util.HashSet");
+ doCollections(classElement, "bag", "java.util.Collection", "java.util.ArrayList");
doArrays(classElement, "array");
doArrays(classElement, "primitive-array");
|
|
From: <one...@us...> - 2002-12-25 04:44:05
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools/codegen/test
In directory sc8-pr-cvs1:/tmp/cvs-serv32157/hibernate/tools/codegen/test
Modified Files:
Test.hbm.xml
Log Message:
added codegen support for <bag>
Index: Test.hbm.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools/codegen/test/Test.hbm.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Test.hbm.xml 10 Nov 2002 15:19:49 -0000 1.3
--- Test.hbm.xml 25 Dec 2002 04:44:02 -0000 1.4
***************
*** 42,45 ****
--- 42,50 ----
</primitive-array>
+ <bag role="names">
+ <key column="principal"/>
+ <element type="string"/>
+ </bag>
+
<subclass name="codegen.test.User" proxy="codegen.test.IUser">
<property name="email"
|
|
From: <one...@us...> - 2002-12-25 04:36:34
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/test
In directory sc8-pr-cvs1:/tmp/cvs-serv30840/hibernate/test
Modified Files:
FooBarTest.java MultiTableTest.java
Log Message:
added tests
Index: FooBarTest.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/FooBarTest.java,v
retrieving revision 1.233
retrieving revision 1.234
diff -C2 -d -r1.233 -r1.234
*** FooBarTest.java 30 Nov 2002 14:24:07 -0000 1.233
--- FooBarTest.java 25 Dec 2002 04:36:31 -0000 1.234
***************
*** 134,137 ****
--- 134,146 ----
s.save(baz2);
+ Bar bar = new Bar();
+ bar.setBaz(baz);
+ s.save(bar);
+
+ assertTrue( s.find("from bar in class Bar, foo in bar.baz.fooSet.elements").size()==0 );
+ assertTrue( s.find("from bar in class Bar, foo in bar.baz.fooArray.elements").size()==1 );
+
+ s.delete(bar);
+
if ( dialect instanceof DB2Dialect || dialect instanceof PostgreSQLDialect ) {
s.iterate("select one from one in class cirrus.hibernate.test.One, many in one.manies.elements group by one order by count(many)");
Index: MultiTableTest.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/MultiTableTest.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** MultiTableTest.java 25 Dec 2002 04:16:37 -0000 1.18
--- MultiTableTest.java 25 Dec 2002 04:36:31 -0000 1.19
***************
*** 129,132 ****
--- 129,133 ----
s.find("from ls in class LessSimple, s in ls.bag.elements where s.id is not null");
+ s.find("from sm in class SubMulti where exists sm.children.elements");
t.commit();
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/map
In directory sc8-pr-cvs1:/tmp/cvs-serv27566/hibernate/map
Modified Files:
Collection.java OneToOne.java PersistentClass.java
RootClass.java Subclass.java Table.java Value.java
Log Message:
fk constraint generation between <joined-subclass> tables
Index: Collection.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/map/Collection.java,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** Collection.java 15 Dec 2002 07:27:37 -0000 1.51
--- Collection.java 25 Dec 2002 04:16:36 -0000 1.52
***************
*** 169,173 ****
}
! if (!isIndexed()) createIndex();
doneSecondPass=true;
--- 169,173 ----
}
! if ( !isIndexed() ) createIndex();
doneSecondPass=true;
***************
*** 212,216 ****
Index index = table.getIndex(name);
Iterator iter = getKey().getColumnIterator();
! while (iter.hasNext()) index.addColumn((Column)iter.next());
return index;
}
--- 212,216 ----
Index index = table.getIndex(name);
Iterator iter = getKey().getColumnIterator();
! while ( iter.hasNext() ) index.addColumn( (Column) iter.next() );
return index;
}
Index: OneToOne.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/map/OneToOne.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** OneToOne.java 30 Nov 2002 08:19:00 -0000 1.5
--- OneToOne.java 25 Dec 2002 04:16:36 -0000 1.6
***************
*** 2,5 ****
--- 2,6 ----
package cirrus.hibernate.map;
+ import java.util.ArrayList;
import java.util.Iterator;
***************
*** 59,64 ****
}
! public Iterator getConstraintColumnIterator() {
! return identifier.getColumnIterator();
}
}
--- 60,68 ----
}
! public java.util.List getConstraintColumns() {
! ArrayList list = new ArrayList();
! Iterator iter = identifier.getColumnIterator();
! while ( iter.hasNext() ) list.add( iter.next() );
! return list;
}
}
Index: PersistentClass.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/map/PersistentClass.java,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** PersistentClass.java 30 Nov 2002 08:19:00 -0000 1.43
--- PersistentClass.java 25 Dec 2002 04:16:36 -0000 1.44
***************
*** 15,19 ****
private final String discriminatorValue;
private final ArrayList properties = new ArrayList();
! private final ArrayList tables = new ArrayList();
private final ArrayList subclasses = new ArrayList();
private final ArrayList subclassProperties = new ArrayList();
--- 15,19 ----
private final String discriminatorValue;
private final ArrayList properties = new ArrayList();
! private Table table;
private final ArrayList subclasses = new ArrayList();
private final ArrayList subclassProperties = new ArrayList();
***************
*** 136,147 ****
properties.add(p);
}
! public void addTable(Table table) {
! tables.add(table);
}
public Iterator getPropertyIterator() {
return properties.iterator();
}
! public Iterator getTableIterator() {
! return tables.iterator();
}
--- 136,147 ----
properties.add(p);
}
! public void setTable(Table table) {
! this.table=table;
}
public Iterator getPropertyIterator() {
return properties.iterator();
}
! public Table getTable() {
! return table;
}
***************
*** 163,167 ****
public abstract boolean isPolymorphic();
public abstract boolean isVersioned();
- public abstract Table getTable();
public abstract CacheConcurrencyStrategy getCache();
public abstract PersistentClass getSuperclass();
--- 163,166 ----
Index: RootClass.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/map/RootClass.java,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -d -r1.54 -r1.55
*** RootClass.java 14 Dec 2002 09:27:55 -0000 1.54
--- RootClass.java 25 Dec 2002 04:16:36 -0000 1.55
***************
*** 2,5 ****
--- 2,6 ----
package cirrus.hibernate.map;
+ import java.util.Collections;
import java.util.Iterator;
***************
*** 27,31 ****
private Property version; //may be final
private boolean polymorphic;
- private final Table table;
private CacheConcurrencyStrategy cache;
private Value discriminator; //may be final
--- 28,31 ----
***************
*** 39,45 ****
}
- public Table getTable() {
- return table;
- }
public Property getIdentifierProperty() {
return identifierProperty;
--- 39,42 ----
***************
*** 74,78 ****
}
public Iterator getTableClosureIterator() {
! return getTableIterator();
}
--- 71,75 ----
}
public Iterator getTableClosureIterator() {
! return Collections.singletonList( getTable() ).iterator();
}
***************
*** 98,103 ****
Node schemaNode = atts.getNamedItem("schema");
String schema = schemaNode==null ? root.getSchemaName() : schemaNode.getNodeValue();
! table = root.addTable(schema, tableName);
! addTable(table);
//PERSISTER
--- 95,100 ----
Node schemaNode = atts.getNamedItem("schema");
String schema = schemaNode==null ? root.getSchemaName() : schemaNode.getNodeValue();
! Table table = root.addTable(schema, tableName);
! setTable(table);
//PERSISTER
Index: Subclass.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/map/Subclass.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** Subclass.java 14 Dec 2002 09:27:55 -0000 1.22
--- Subclass.java 25 Dec 2002 04:16:36 -0000 1.23
***************
*** 14,18 ****
public class Subclass extends PersistentClass {
private final PersistentClass superclass;
- private final Table table;
private Value key;
--- 14,17 ----
***************
*** 54,60 ****
return true;
}
- public Table getTable() {
- return table;
- }
public void addProperty(Property p) {
--- 53,56 ----
***************
*** 62,74 ****
getSuperclass().addSubclassProperty(p);
}
! public void addTable(Table table) {
! super.addTable(table);
getSuperclass().addSubclassTable(table);
}
public Iterator getPropertyClosureIterator() {
! return new JoinedIterator( new Iterator[] { getPropertyIterator(), getSuperclass().getPropertyClosureIterator() } );
}
public Iterator getTableClosureIterator() {
! return new JoinedIterator( new Iterator[] { getTableIterator(), getSuperclass().getTableClosureIterator() } );
}
protected void addSubclassProperty(Property p) {
--- 58,76 ----
getSuperclass().addSubclassProperty(p);
}
! public void setTable(Table table) {
! super.setTable(table);
getSuperclass().addSubclassTable(table);
}
public Iterator getPropertyClosureIterator() {
! return new JoinedIterator( new Iterator[] {
! getPropertyIterator(),
! getSuperclass().getPropertyClosureIterator() }
! );
}
public Iterator getTableClosureIterator() {
! return new JoinedIterator( new Iterator[] {
! getSuperclass().getTableClosureIterator(),
! Collections.singletonList( getTable() ).iterator()
! } );
}
protected void addSubclassProperty(Property p) {
***************
*** 98,102 ****
}
! this.table = table;
}
else {
--- 100,104 ----
}
! setTable(table);
}
else {
***************
*** 110,137 ****
Node schemaNode = atts.getNamedItem("schema");
String schema = schemaNode==null ? root.getSchemaName() : schemaNode.getNodeValue();
! this.table = root.addTable(schema, tableName);
! addTable(this.table);
//Primary key constraint
PrimaryKey pk = new PrimaryKey();
! pk.setTable(this.table);
pk.setName( StringHelper.suffix( tableName, "PK" ) );
! this.table.setPrimaryKey(pk);
!
NodeList subnodes = node.getChildNodes();
for ( int i=0; i<subnodes.getLength(); i++ ) {
if ( "key".equals( subnodes.item(i).getNodeName() ) ) {
! key = new Value( subnodes.item(i), Root.ROOT_ROLE_NAME, false, this.table, root );
}
}
- /*if ( key==null) {
- key = getIdentifier();
- Iterator iter = key.getColumnIterator();
- while ( iter.hasNext() ) {
- Column col = (Column) iter.next();
- this.table.addColumn(col);
- }
- }*/
key.setType( getIdentifier().getType() );
--- 112,130 ----
Node schemaNode = atts.getNamedItem("schema");
String schema = schemaNode==null ? root.getSchemaName() : schemaNode.getNodeValue();
! Table mytable = root.addTable(schema, tableName);
! setTable(mytable);
//Primary key constraint
PrimaryKey pk = new PrimaryKey();
! pk.setTable(mytable);
pk.setName( StringHelper.suffix( tableName, "PK" ) );
! mytable.setPrimaryKey(pk);
NodeList subnodes = node.getChildNodes();
for ( int i=0; i<subnodes.getLength(); i++ ) {
if ( "key".equals( subnodes.item(i).getNodeName() ) ) {
! key = new Value( subnodes.item(i), Root.ROOT_ROLE_NAME, false, mytable, root );
}
}
key.setType( getIdentifier().getType() );
***************
*** 142,145 ****
--- 135,142 ----
pk.addColumn(col);
}
+
+ ForeignKey fk = mytable.getForeignKey( key.getConstraintColumns() );
+ fk.setReferencedClass( superclass.getPersistentClass() );
+
}
Index: Table.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/map/Table.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** Table.java 15 Dec 2002 07:27:38 -0000 1.32
--- Table.java 25 Dec 2002 04:16:36 -0000 1.33
***************
*** 3,6 ****
--- 3,7 ----
import java.util.Iterator;
+ import java.util.List;
import java.util.Map;
import java.util.HashMap;
***************
*** 197,203 ****
}
! public ForeignKey getForeignKey(String name)
! {
! ForeignKey fk = (ForeignKey)foreignKeys.get(name);
if (fk == null) {
--- 198,205 ----
}
! public ForeignKey getForeignKey(List columns) {
!
! String name = "FK" + uniqueColumnString( columns.iterator() );
! ForeignKey fk = (ForeignKey) foreignKeys.get(name);
if (fk == null) {
***************
*** 207,211 ****
foreignKeys.put(name, fk);
}
!
return fk;
}
--- 209,214 ----
foreignKeys.put(name, fk);
}
! Iterator iter = columns.iterator();
! while ( iter.hasNext() ) fk.addColumn( (Column) iter.next() );
return fk;
}
Index: Value.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/map/Value.java,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** Value.java 15 Dec 2002 07:27:38 -0000 1.43
--- Value.java 25 Dec 2002 04:16:36 -0000 1.44
***************
*** 22,26 ****
public void addColumn(Column column) {
! if (!columns.contains(column)) columns.add(column);
}
public int getColumnSpan() {
--- 22,26 ----
public void addColumn(Column column) {
! if ( !columns.contains(column) ) columns.add(column);
}
public int getColumnSpan() {
***************
*** 30,35 ****
return columns.iterator();
}
! public Iterator getConstraintColumnIterator() {
! return columns.iterator();
}
--- 30,35 ----
return columns.iterator();
}
! public java.util.List getConstraintColumns() {
! return columns;
}
***************
*** 105,112 ****
public void createForeignKeyOfClass(Root root, Table table, Class persistentClass) {
//foreign key
! String name = "FK" + table.uniqueColumnString( getConstraintColumnIterator() );
! ForeignKey fk = table.getForeignKey(name);
! Iterator iter = getConstraintColumnIterator();
! while (iter.hasNext()) fk.addColumn((Column)iter.next());
fk.setReferencedClass(persistentClass);
}
--- 105,109 ----
public void createForeignKeyOfClass(Root root, Table table, Class persistentClass) {
//foreign key
! ForeignKey fk = table.getForeignKey( getConstraintColumns() );
fk.setReferencedClass(persistentClass);
}
|
|
From: <one...@us...> - 2002-12-25 04:16:39
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/test
In directory sc8-pr-cvs1:/tmp/cvs-serv27566/hibernate/test
Modified Files:
MultiTableTest.java
Log Message:
fk constraint generation between <joined-subclass> tables
Index: MultiTableTest.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/MultiTableTest.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** MultiTableTest.java 25 Dec 2002 01:02:16 -0000 1.17
--- MultiTableTest.java 25 Dec 2002 04:16:37 -0000 1.18
***************
*** 20,23 ****
--- 20,38 ----
}
+ public void testConstraints() throws Exception {
+ Session s = sessions.openSession();
+ Transaction t = s.beginTransaction();
+ SubMulti sm = new SubMulti();
+ sm.setAmount(66.5f);
+ s.save( sm, new Long(2) );
+ t.commit();
+ s.close();
+ s = sessions.openSession();
+ s.delete( "from sm in class SubMulti" );
+ t = s.beginTransaction();
+ t.commit();
+ s.close();
+ }
+
public void testMultiTable() throws Exception {
Session s = sessions.openSession();
|
|
From: <one...@us...> - 2002-12-25 02:00:19
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/type
In directory sc8-pr-cvs1:/tmp/cvs-serv5389/hibernate/type
Modified Files:
BlobType.java ClobType.java
Log Message:
added ClobImpl, BlobImpl
Index: BlobType.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/type/BlobType.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** BlobType.java 12 Dec 2002 11:33:36 -0000 1.1
--- BlobType.java 25 Dec 2002 02:00:15 -0000 1.2
***************
*** 6,14 ****
import cirrus.hibernate.HibernateException;
public class BlobType extends ImmutableType {
public void set(PreparedStatement st, Object value, int index) throws HibernateException, SQLException {
! st.setBlob(index, (Blob) value);
}
--- 6,20 ----
import cirrus.hibernate.HibernateException;
+ import cirrus.hibernate.lob.BlobImpl;
public class BlobType extends ImmutableType {
public void set(PreparedStatement st, Object value, int index) throws HibernateException, SQLException {
! if (value instanceof BlobImpl) {
! st.setBytes(index, ( (BlobImpl) value ).toBytes() );
! }
! else {
! st.setBlob(index, (Blob) value);
! }
}
Index: ClobType.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/type/ClobType.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ClobType.java 12 Dec 2002 11:33:36 -0000 1.1
--- ClobType.java 25 Dec 2002 02:00:15 -0000 1.2
***************
*** 6,14 ****
import cirrus.hibernate.HibernateException;
public class ClobType extends ImmutableType {
public void set(PreparedStatement st, Object value, int index) throws HibernateException, SQLException {
! st.setClob(index, (Clob) value);
}
--- 6,20 ----
import cirrus.hibernate.HibernateException;
+ import cirrus.hibernate.lob.ClobImpl;
public class ClobType extends ImmutableType {
public void set(PreparedStatement st, Object value, int index) throws HibernateException, SQLException {
! if (value instanceof ClobImpl) {
! st.setString( index, ( (ClobImpl) value ).toString() );
! }
! else {
! st.setClob(index, (Clob) value);
! }
}
|
|
From: <one...@us...> - 2002-12-25 02:00:17
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate
In directory sc8-pr-cvs1:/tmp/cvs-serv5389/hibernate
Modified Files:
Hibernate.java
Log Message:
added ClobImpl, BlobImpl
Index: Hibernate.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/Hibernate.java,v
retrieving revision 1.64
retrieving revision 1.65
diff -C2 -d -r1.64 -r1.65
*** Hibernate.java 14 Dec 2002 09:27:55 -0000 1.64
--- Hibernate.java 25 Dec 2002 02:00:14 -0000 1.65
***************
*** 6,9 ****
--- 6,11 ----
import cirrus.hibernate.type.*;
import java.io.Serializable;
+ import java.sql.Blob;
+ import java.sql.Clob;
import java.sql.SQLException;
***************
*** 12,15 ****
--- 14,19 ----
import cirrus.hibernate.impl.DatastoreImpl;
import cirrus.hibernate.impl.SessionFactoryObjectFactory;
+ import cirrus.hibernate.lob.BlobImpl;
+ import cirrus.hibernate.lob.ClobImpl;
/**
***************
*** 202,204 ****
--- 206,224 ----
}
}
+
+ /**
+ * Create a new <tt>Blob</tt>. The returned object will be
+ * initially immutable.
+ */
+ public static Blob createBlob(byte[] bytes) {
+ return new BlobImpl(bytes);
+ }
+
+ /**
+ * Create a new <tt>Clob</tt>. The returned object will be
+ * initially immutable.
+ */
+ public static Clob createClob(String string) {
+ return new ClobImpl(string);
+ }
}
|
|
From: <one...@us...> - 2002-12-25 02:00:17
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/lob
In directory sc8-pr-cvs1:/tmp/cvs-serv5389/hibernate/lob
Added Files:
BlobImpl.java ClobImpl.java
Log Message:
added ClobImpl, BlobImpl
--- NEW FILE: BlobImpl.java ---
//$Id: BlobImpl.java,v 1.1 2002/12/25 02:00:15 oneovthafew Exp $
package cirrus.hibernate.lob;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.sql.Blob;
import java.sql.SQLException;
public class BlobImpl implements Blob {
private byte[] bytes;
public byte[] toBytes() {
return bytes;
}
public BlobImpl(byte[] bytes) {
this.bytes = bytes;
}
/**
* @see java.sql.Blob#length()
*/
public long length() throws SQLException {
return bytes.length;
}
/**
* @see java.sql.Blob#truncate(long)
*/
public void truncate(long arg0) throws SQLException {
excep();
}
/**
* @see java.sql.Blob#getBytes(long, int)
*/
public byte[] getBytes(long arg0, int arg1) throws SQLException {
excep(); return null;
}
/**
* @see java.sql.Blob#setBytes(long, byte[])
*/
public int setBytes(long arg0, byte[] arg1) throws SQLException {
excep(); return 0;
}
/**
* @see java.sql.Blob#setBytes(long, byte[], int, int)
*/
public int setBytes(long arg0, byte[] arg1, int arg2, int arg3)
throws SQLException {
excep(); return 0;
}
/**
* @see java.sql.Blob#position(byte[], long)
*/
public long position(byte[] arg0, long arg1) throws SQLException {
excep(); return 0;
}
/**
* @see java.sql.Blob#getBinaryStream()
*/
public InputStream getBinaryStream() throws SQLException {
return new ByteArrayInputStream(bytes);
}
/**
* @see java.sql.Blob#setBinaryStream(long)
*/
public OutputStream setBinaryStream(long arg0) throws SQLException {
excep(); return null;
}
/**
* @see java.sql.Blob#position(Blob, long)
*/
public long position(Blob arg0, long arg1) throws SQLException {
excep(); return 0;
}
private void excep() {
throw new UnsupportedOperationException("Blob may not be manipulated from creating session");
}
}
--- NEW FILE: ClobImpl.java ---
//$Id: ClobImpl.java,v 1.1 2002/12/25 02:00:15 oneovthafew Exp $
package cirrus.hibernate.lob;
import java.io.CharArrayReader;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Reader;
import java.io.StringBufferInputStream;
import java.io.Writer;
import java.sql.Clob;
import java.sql.SQLException;
public class ClobImpl implements Clob {
private char[] chars;
public ClobImpl(String string) {
chars = string.toCharArray();
}
public String toString() {
return new String(chars);
}
/**
* @see java.sql.Clob#length()
*/
public long length() throws SQLException {
return chars.length;
}
/**
* @see java.sql.Clob#truncate(long)
*/
public void truncate(long arg0) throws SQLException {
excep();
}
/**
* @see java.sql.Clob#getAsciiStream()
*/
public InputStream getAsciiStream() throws SQLException {
return new StringBufferInputStream( new String(chars) );
}
/**
* @see java.sql.Clob#setAsciiStream(long)
*/
public OutputStream setAsciiStream(long arg0) throws SQLException {
excep(); return null;
}
/**
* @see java.sql.Clob#getCharacterStream()
*/
public Reader getCharacterStream() throws SQLException {
return new CharArrayReader(chars);
}
/**
* @see java.sql.Clob#setCharacterStream(long)
*/
public Writer setCharacterStream(long arg0) throws SQLException {
excep(); return null;
}
/**
* @see java.sql.Clob#getSubString(long, int)
*/
public String getSubString(long arg0, int arg1) throws SQLException {
excep(); return null;
}
/**
* @see java.sql.Clob#setString(long, String)
*/
public int setString(long arg0, String arg1) throws SQLException {
excep(); return 0;
}
/**
* @see java.sql.Clob#setString(long, String, int, int)
*/
public int setString(long arg0, String arg1, int arg2, int arg3)
throws SQLException {
excep(); return 0;
}
/**
* @see java.sql.Clob#position(String, long)
*/
public long position(String arg0, long arg1) throws SQLException {
excep(); return 0;
}
/**
* @see java.sql.Clob#position(Clob, long)
*/
public long position(Clob arg0, long arg1) throws SQLException {
excep(); return 0;
}
private void excep() {
throw new UnsupportedOperationException("Blob may not be manipulated from creating session");
}
}
|
|
From: <one...@us...> - 2002-12-25 01:58:33
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/lob In directory sc8-pr-cvs1:/tmp/cvs-serv5098/hibernate/lob Log Message: Directory /cvsroot/hibernate/Hibernate/cirrus/hibernate/lob added to the repository |
|
From: <one...@us...> - 2002-12-25 01:02:20
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/type
In directory sc8-pr-cvs1:/tmp/cvs-serv25620/hibernate/type
Modified Files:
EntityType.java OneToOneType.java TimestampType.java Type.java
Log Message:
fixed a bug caching null one-to-one associations
Index: EntityType.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/type/EntityType.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** EntityType.java 26 Oct 2002 16:43:27 -0000 1.13
--- EntityType.java 25 Dec 2002 01:02:16 -0000 1.14
***************
*** 96,102 ****
else {
Serializable id = session.getID(value);
! if (id ==null) {
! throw new AssertionFailure("null id");
! }
return id;
}
--- 96,100 ----
else {
Serializable id = session.getID(value);
! if (id==null) throw new AssertionFailure("cannot cache a reference to an object with a null id");
return id;
}
***************
*** 118,121 ****
--- 116,126 ----
return resolveIdentifier( hydrate(rs, names, session, owner), session );
}
+
+ public abstract Object hydrate(
+ ResultSet rs,
+ String[] names,
+ SessionImplementor session,
+ Object owner)
+ throws HibernateException, SQLException;
}
Index: OneToOneType.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/type/OneToOneType.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** OneToOneType.java 20 Oct 2002 08:13:12 -0000 1.11
--- OneToOneType.java 25 Dec 2002 01:02:16 -0000 1.12
***************
*** 64,67 ****
--- 64,69 ----
public Object resolveIdentifier(Object value, SessionImplementor session) throws HibernateException, SQLException {
+
+ if (value==null) return null;
Class clazz = getPersistentClass();
Index: TimestampType.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/type/TimestampType.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** TimestampType.java 19 Dec 2002 11:29:03 -0000 1.32
--- TimestampType.java 25 Dec 2002 01:02:16 -0000 1.33
***************
*** 46,49 ****
--- 46,57 ----
if (x==null || y==null) return false;
+ /*if (
+ x instanceof Timestamp &&
+ y instanceof Timestamp &&
+ ( (Timestamp) x ).getNanos() != ( (Timestamp) y ).getNanos()
+ ) return false;
+
+ return ( (java.util.Date) x ).getTime()==( (java.util.Date) y ).getTime();*/
+
long xTime = ( (java.util.Date) x ).getTime();
long yTime = ( (java.util.Date) y ).getTime();
Index: Type.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/type/Type.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** Type.java 24 Oct 2002 10:04:29 -0000 1.39
--- Type.java 25 Dec 2002 01:02:16 -0000 1.40
***************
*** 186,190 ****
/**
! * Reconstruct the object from its cached "diassembled" state.
* @param cached the disassembled state from the cache
* @param session the session
--- 186,190 ----
/**
! * Reconstruct the object from its cached "disassembled" state.
* @param cached the disassembled state from the cache
* @param session the session
|
|
From: <one...@us...> - 2002-12-25 01:02:20
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/test
In directory sc8-pr-cvs1:/tmp/cvs-serv25620/hibernate/test
Modified Files:
LessSimple.java Multi.hbm.xml MultiTableTest.java
Log Message:
fixed a bug caching null one-to-one associations
Index: LessSimple.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/LessSimple.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** LessSimple.java 19 Dec 2002 10:47:50 -0000 1.5
--- LessSimple.java 25 Dec 2002 01:02:16 -0000 1.6
***************
*** 12,15 ****
--- 12,16 ----
private Simple another;
private LessSimple yetanother;
+ private Po mypo;
/**
* Returns the intprop.
***************
*** 106,109 ****
--- 107,126 ----
public void setBag(List bag) {
this.bag = bag;
+ }
+
+ /**
+ * Returns the mypo.
+ * @return Po
+ */
+ public Po getMypo() {
+ return mypo;
+ }
+
+ /**
+ * Sets the mypo.
+ * @param mypo The mypo to set
+ */
+ public void setMypo(Po mypo) {
+ this.mypo = mypo;
}
Index: Multi.hbm.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/Multi.hbm.xml,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** Multi.hbm.xml 19 Dec 2002 10:47:51 -0000 1.18
--- Multi.hbm.xml 25 Dec 2002 01:02:16 -0000 1.19
***************
*** 4,7 ****
--- 4,8 ----
<class name="cirrus.hibernate.test.Simple" table="rootclass">
+ <jcs-cache usage="read-write"/>
<id type="long" column="id_" >
<generator class="native"/>
***************
*** 27,30 ****
--- 28,32 ----
<many-to-many column="simple2" class="cirrus.hibernate.test.Simple"/>
</bag>
+ <one-to-one name="mypo"/>
</joined-subclass>
Index: MultiTableTest.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/MultiTableTest.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** MultiTableTest.java 19 Dec 2002 10:47:51 -0000 1.16
--- MultiTableTest.java 25 Dec 2002 01:02:16 -0000 1.17
***************
*** 221,224 ****
--- 221,240 ----
s.close();
}
+
+ public void testOneToOne() throws Exception {
+ Session s = sessions.openSession();
+ LessSimple ls = new LessSimple();
+ Serializable id = s.save(ls);
+ s.flush();
+ s.connection().commit();
+ s = sessions.openSession();
+ s.load(LessSimple.class, id);
+ s.connection().commit();
+ s.close();
+ s = sessions.openSession();
+ s.load(LessSimple.class, id);
+ s.connection().commit();
+ s.close();
+ }
|