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...> - 2003-01-18 09:57:39
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test
In directory sc8-pr-cvs1:/tmp/cvs-serv8629/sf/hibernate/test
Modified Files:
FooBar.hbm.xml
Log Message:
fixed some problems with aliases conflicting and outer joins appearing in wrong place
Index: FooBar.hbm.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/FooBar.hbm.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** FooBar.hbm.xml 18 Jan 2003 09:03:55 -0000 1.3
--- FooBar.hbm.xml 18 Jan 2003 09:57:36 -0000 1.4
***************
*** 61,66 ****
<property name="locale" column="locale_"/>
<property name="custom" type="net.sf.hibernate.test.DoubleStringType">
! <column name="first_name"/>
! <column name="surname"/>
</property>
<many-to-one name="dependent" class="net.sf.hibernate.test.Fee" cascade="all" not-null="true"/>
--- 61,66 ----
<property name="locale" column="locale_"/>
<property name="custom" type="net.sf.hibernate.test.DoubleStringType">
! <column name="first_name" length="66"/>
! <column name="surname" length="66"/>
</property>
<many-to-one name="dependent" class="net.sf.hibernate.test.Fee" cascade="all" not-null="true"/>
|
|
From: <one...@us...> - 2003-01-18 09:57:39
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/hql
In directory sc8-pr-cvs1:/tmp/cvs-serv8629/sf/hibernate/hql
Modified Files:
QueryTranslator.java
Log Message:
fixed some problems with aliases conflicting and outer joins appearing in wrong place
Index: QueryTranslator.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/hql/QueryTranslator.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** QueryTranslator.java 18 Jan 2003 09:03:54 -0000 1.6
--- QueryTranslator.java 18 Jan 2003 09:57:36 -0000 1.7
***************
*** 437,441 ****
String selectProperties;
String selectIdentifiers;
! if ( !isShallowQuery() && size==1 ) {
OuterJoinLoader ojl = new OuterJoinLoader( factory.getDialect() );
String name = (String) returnTypes.get(0);
--- 437,441 ----
String selectProperties;
String selectIdentifiers;
! if ( !isShallowQuery() && returnTypes.size()==1 && typeMap.size()==1 && collections.size()==0 ) {
OuterJoinLoader ojl = new OuterJoinLoader( factory.getDialect() );
String name = (String) returnTypes.get(0);
***************
*** 446,450 ****
String[] ojsuffixes = new String[joins];
ojl.setSuffixed(ojsuffixes);
! for ( int i=0; i<joins; i++ ) ojsuffixes[i] = Integer.toString(i);
selectProperties = persister.propertySelectClauseFragment(name, "");
selectIdentifiers = persister.selectIdentifierString(name, "");
--- 446,450 ----
String[] ojsuffixes = new String[joins];
ojl.setSuffixed(ojsuffixes);
! for ( int i=0; i<joins; i++ ) ojsuffixes[i] = Integer.toString(i) + '_';
selectProperties = persister.propertySelectClauseFragment(name, "");
selectIdentifiers = persister.selectIdentifierString(name, "");
***************
*** 457,461 ****
suffixes[joins] = "";
for ( int i=0; i<joins; i++ ) {
! suffixes[i] = Integer.toString(i);
persisters[i] = (Queryable) ( (OuterJoinableAssociation) associations.get(i) ).subpersister; //TODO: dont like the typecast to Queryable
}
--- 457,461 ----
suffixes[joins] = "";
for ( int i=0; i<joins; i++ ) {
! suffixes[i] = Integer.toString(i) + '_';
persisters[i] = (Queryable) ( (OuterJoinableAssociation) associations.get(i) ).subpersister; //TODO: dont like the typecast to Queryable
}
***************
*** 468,472 ****
if ( !isName(name) ) throw new QueryException("unknown type: " + name);
persisters[i] = getPersisterForName(name);
! suffixes[i] = (size==1) ? "" : Integer.toString(i);
}
selectProperties = renderPropertiesSelect();
--- 468,472 ----
if ( !isName(name) ) throw new QueryException("unknown type: " + name);
persisters[i] = getPersisterForName(name);
! suffixes[i] = (size==1) ? "" : Integer.toString(i) + '_';
}
selectProperties = renderPropertiesSelect();
***************
*** 523,527 ****
for ( int k=0; k<size; k++ ) {
String name = (String) returnTypes.get(k);
! String suffix = size==1 ? "" : Integer.toString(k);
buf.append( persisters[k].selectIdentifierString(name, suffix) );
if ( k!=size-1 ) buf.append(", ");
--- 523,527 ----
for ( int k=0; k<size; k++ ) {
String name = (String) returnTypes.get(k);
! String suffix = size==1 ? "" : Integer.toString(k) + '_';
buf.append( persisters[k].selectIdentifierString(name, suffix) );
if ( k!=size-1 ) buf.append(", ");
***************
*** 551,555 ****
int size = returnTypes.size();
for ( int k=0; k<size; k++ ) {
! String suffix = (size==1) ? "" : Integer.toString(k);
String name = (String) returnTypes.get(k) ;
buf.append( persisters[k].propertySelectClauseFragment(name, suffix) );
--- 551,555 ----
int size = returnTypes.size();
for ( int k=0; k<size; k++ ) {
! String suffix = (size==1) ? "" : Integer.toString(k) + '_';
String name = (String) returnTypes.get(k) ;
buf.append( persisters[k].propertySelectClauseFragment(name, suffix) );
|
|
From: <one...@us...> - 2003-01-18 09:57:39
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/loader In directory sc8-pr-cvs1:/tmp/cvs-serv8629/sf/hibernate/loader Modified Files: OuterJoinLoader.java Log Message: fixed some problems with aliases conflicting and outer joins appearing in wrong place Index: OuterJoinLoader.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/loader/OuterJoinLoader.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** OuterJoinLoader.java 18 Jan 2003 09:03:54 -0000 1.7 --- OuterJoinLoader.java 18 Jan 2003 09:57:36 -0000 1.8 *************** *** 283,287 **** return StringHelper.suffix( tableName.length() <=5 ? tableName : tableName.substring(0, 5), ! Integer.toString(n) ); } --- 283,287 ---- return StringHelper.suffix( tableName.length() <=5 ? tableName : tableName.substring(0, 5), ! Integer.toString(n) + '_' ); } |
|
From: <one...@us...> - 2003-01-18 09:03:57
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/loader
In directory sc8-pr-cvs1:/tmp/cvs-serv29740/sf/hibernate/loader
Modified Files:
EntityLoader.java Loader.java OuterJoinLoader.java
SimpleEntityLoader.java
Log Message:
implemented outerjoin fetching for single-column queries
Index: EntityLoader.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/loader/EntityLoader.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** EntityLoader.java 15 Jan 2003 12:49:01 -0000 1.5
--- EntityLoader.java 18 Jan 2003 09:03:54 -0000 1.6
***************
*** 8,12 ****
import net.sf.hibernate.HibernateException;
import net.sf.hibernate.MappingException;
- import net.sf.hibernate.collection.CollectionPersister;
import net.sf.hibernate.engine.SessionFactoryImplementor;
import net.sf.hibernate.engine.SessionImplementor;
--- 8,11 ----
***************
*** 58,70 ****
}
- protected CollectionPersister getCollectionPersister() {
- return null;
- }
-
public Object load(SessionImplementor session, Serializable id, Object object) throws HibernateException, SQLException {
List list = loadEntity(session, new Object[] { id }, idType, object, id, false);
if ( list.size()==1 ) {
final int len = classPersisters.length;
! return ( len==1 ) ? list.get(0) : ( (Object[]) list.get(0) )[len-1];
}
else if ( list.size()==0 ) {
--- 57,65 ----
}
public Object load(SessionImplementor session, Serializable id, Object object) throws HibernateException, SQLException {
List list = loadEntity(session, new Object[] { id }, idType, object, id, false);
if ( list.size()==1 ) {
final int len = classPersisters.length;
! return ( (Object[]) list.get(0) )[len-1];
}
else if ( list.size()==0 ) {
Index: Loader.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/loader/Loader.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Loader.java 15 Jan 2003 12:49:01 -0000 1.5
--- Loader.java 18 Jan 2003 09:03:54 -0000 1.6
***************
*** 71,92 ****
return true;
}
- /**
- * The return types of a find() query
- */
- protected Type[] getReturnTypes() {
- return null;
- }
- /**
- * The column names holding returned scalar values
- */
- public String[][] getScalarColumnNames() {
- return null;
- }
- /**
- * A hack to allow scalar values in a find() query
- */
- protected boolean hasScalarValues() {
- return false;
- }
/**
--- 71,74 ----
***************
*** 134,145 ****
}
- String[][] names = null;
- Type[] returnTypes = null;
- final boolean scalars = hasScalarValues();
- if (scalars) {
- returnTypes = getReturnTypes();
- names = getScalarColumnNames();
- }
-
final List results = new ArrayList(); //new net.sf.hibernate.collections.List(this);
--- 116,119 ----
***************
*** 182,201 ****
}
! if (!scalars) {
! //hacky!!
! results.add( ( cols==1 ) ? row[0] : row );
! }
! else {
! int queryCols = returnTypes.length;
! if ( queryCols==1 ) {
! results.add( returnTypes[0].nullSafeGet( rs, names[0], session, null ) );
! }
! else {
! Object[] queryRow = new Object[queryCols];
! for ( int i=0; i<queryCols; i++ )
! queryRow[i] = returnTypes[i].nullSafeGet( rs, names[i], session, null );
! results.add(queryRow);
! }
! }
if (collection) optionalCollection.readFrom( rs, getCollectionPersister(), optionalCollectionOwner );
--- 156,161 ----
}
!
! results.add( getResultColumnOrRow(row, rs, session) );
if (collection) optionalCollection.readFrom( rs, getCollectionPersister(), optionalCollectionOwner );
***************
*** 225,228 ****
--- 185,192 ----
}
+ protected Object getResultColumnOrRow(Object[] row, ResultSet rs, SessionImplementor session) throws SQLException, HibernateException {
+ return row;
+ }
+
/**
* Read a row of <tt>Key</tt>s from the <tt>ResultSet</tt> into the given array. Warning: this
***************
*** 510,514 ****
* Called by subclasses that implement queries
*/
! public final List find(
final SessionImplementor session,
final Object[] values,
--- 474,478 ----
* Called by subclasses that implement queries
*/
! protected List find(
final SessionImplementor session,
final Object[] values,
Index: OuterJoinLoader.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/loader/OuterJoinLoader.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** OuterJoinLoader.java 15 Jan 2003 12:49:01 -0000 1.6
--- OuterJoinLoader.java 18 Jan 2003 09:03:54 -0000 1.7
***************
*** 26,30 ****
* join.
*/
! public abstract class OuterJoinLoader extends Loader {
public static final int EAGER = 1;
--- 26,30 ----
* join.
*/
! public /*abstract*/ class OuterJoinLoader extends Loader {
public static final int EAGER = 1;
***************
*** 39,46 ****
protected String sql;
protected String[] suffixes;
! protected final OuterJoinGenerator outerJoinGenerator;
! public OuterJoinLoader(Dialect dialect)
! {
outerJoinGenerator = dialect.getOuterJoinGenerator();
}
--- 39,45 ----
protected String sql;
protected String[] suffixes;
! protected final OuterJoinGenerator outerJoinGenerator;
! public OuterJoinLoader(Dialect dialect) {
outerJoinGenerator = dialect.getOuterJoinGenerator();
}
***************
*** 48,54 ****
public static final class OuterJoinableAssociation {
//Object persister; // a class or collection persister!
! Loadable subpersister;
! String[] foreignKeyColumns; // belong to persister
! String subalias;
}
--- 47,53 ----
public static final class OuterJoinableAssociation {
//Object persister; // a class or collection persister!
! public Loadable subpersister;
! public String[] foreignKeyColumns; // belong to persister
! public String subalias;
}
***************
*** 56,60 ****
* For an entity class, return a list of associations to be fetched by outerjoin
*/
! protected final List walkTree(Loadable persister, String alias, SessionFactoryImplementor session) throws MappingException {
List associations = new ArrayList();
walkTree(persister, alias, associations, new HashSet(), session);
--- 55,59 ----
* For an entity class, return a list of associations to be fetched by outerjoin
*/
! public final List walkTree(Loadable persister, String alias, SessionFactoryImplementor session) throws MappingException {
List associations = new ArrayList();
walkTree(persister, alias, associations, new HashSet(), session);
***************
*** 72,85 ****
Type type = persister.getElementType();
- String[] columns = StringHelper.prefix( persister.getElementColumnNames(), alias + '.' );
if ( type.isEntityType() ) {
EntityType etype = (EntityType) type;
if ( autoEager( persister.enableJoinedFetch(), etype, session ) ) {
// fetch many-to-many by outerjoin depending value of outer-join in mapping
walkTree(etype, columns, persister, associations, new HashSet(), session);
}
}
else if ( type.isComponentType() ) {
! walkTree( (AbstractComponentType) type, columns, persister, alias, associations, new HashSet(), session);
}
--- 71,84 ----
Type type = persister.getElementType();
if ( type.isEntityType() ) {
EntityType etype = (EntityType) type;
if ( autoEager( persister.enableJoinedFetch(), etype, session ) ) {
// fetch many-to-many by outerjoin depending value of outer-join in mapping
+ String[] columns = StringHelper.prefix( persister.getElementColumnNames(), alias + '.' );
walkTree(etype, columns, persister, associations, new HashSet(), session);
}
}
else if ( type.isComponentType() ) {
! walkTree( (AbstractComponentType) type, persister.getElementColumnNames(), persister, alias, associations, new HashSet(), session);
}
***************
*** 142,147 ****
if ( types[i].isEntityType() ) {
EntityType etype = (EntityType) types[i];
! if ( autoEager( act.enableJoinedFetch(i), etype, session ) )
! walkTree(etype, range, persister, associations, classPersisters, session);
}
else if ( types[i].isComponentType() ) {
--- 141,148 ----
if ( types[i].isEntityType() ) {
EntityType etype = (EntityType) types[i];
! if ( autoEager( act.enableJoinedFetch(i), etype, session ) ) {
! String[] columns = StringHelper.prefix( range, alias + '.' );
! walkTree(etype, columns, persister, associations, classPersisters, session);
! }
}
else if ( types[i].isComponentType() ) {
***************
*** 195,199 ****
* Generate a select list of columns containing all properties of the entity classes
*/
! protected final String selectString(List associations) {
StringBuffer buf = new StringBuffer(100);
for ( int i=0; i<associations.size(); i++ ) {
--- 196,200 ----
* Generate a select list of columns containing all properties of the entity classes
*/
! public final String selectString(List associations) {
StringBuffer buf = new StringBuffer(100);
for ( int i=0; i<associations.size(); i++ ) {
***************
*** 286,289 ****
--- 287,305 ----
}
+ protected CollectionPersister getCollectionPersister() {
+ return null;
+ }
+
+ public String outerJoinsAfterFrom(List associations) {
+ return outerJoinGenerator.outerJoinStringAfterFrom(associations);
+ }
+
+ public String outerJoinsAfterWhere(List associations) {
+ return outerJoinGenerator.outerJoinStringAfterWhere(associations);
+ }
+
+ public void setSuffixed(String[] suffixes) {
+ this.suffixes = suffixes;
+ }
}
Index: SimpleEntityLoader.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/loader/SimpleEntityLoader.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** SimpleEntityLoader.java 15 Jan 2003 12:49:01 -0000 1.5
--- SimpleEntityLoader.java 18 Jan 2003 09:03:54 -0000 1.6
***************
*** 54,58 ****
List list = loadEntity(session, new Object[] { id }, idType, object, id, false);
if ( list.size()==1 ) {
! return list.get(0);
}
else if ( list.size()==0 ) {
--- 54,58 ----
List list = loadEntity(session, new Object[] { id }, idType, object, id, false);
if ( list.size()==1 ) {
! return ( (Object[]) list.get(0) )[0];
}
else if ( list.size()==0 ) {
|
|
From: <one...@us...> - 2003-01-18 09:03:57
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test
In directory sc8-pr-cvs1:/tmp/cvs-serv29740/sf/hibernate/test
Modified Files:
FooBar.hbm.xml
Log Message:
implemented outerjoin fetching for single-column queries
Index: FooBar.hbm.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/FooBar.hbm.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** FooBar.hbm.xml 9 Jan 2003 12:24:51 -0000 1.2
--- FooBar.hbm.xml 18 Jan 2003 09:03:55 -0000 1.3
***************
*** 35,44 ****
<property name="double" column="double_"/>
! <primitive-array name="bytes" table="foobytes">
! <key column="id"/>
! <index column="i"/>
! <element column="byte_" type="byte"/>
! </primitive-array>
!
<property name="date" type="date" column="date_"/>
--- 35,43 ----
<property name="double" column="double_"/>
! <primitive-array name="bytes" table="foobytes">
! <key column="id"/>
! <index column="i"/>
! <element column="byte_" type="byte"/>
! </primitive-array>
<property name="date" type="date" column="date_"/>
|
|
From: <one...@us...> - 2003-01-18 09:03:57
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/hql
In directory sc8-pr-cvs1:/tmp/cvs-serv29740/sf/hibernate/hql
Modified Files:
QueryTranslator.java
Log Message:
implemented outerjoin fetching for single-column queries
Index: QueryTranslator.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/hql/QueryTranslator.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** QueryTranslator.java 12 Jan 2003 15:04:51 -0000 1.5
--- QueryTranslator.java 18 Jan 2003 09:03:54 -0000 1.6
***************
*** 16,22 ****
import java.util.StringTokenizer;
- import org.apache.commons.logging.Log;
- import org.apache.commons.logging.LogFactory;
-
import net.sf.hibernate.Hibernate;
import net.sf.hibernate.HibernateException;
--- 16,19 ----
***************
*** 29,43 ****
import net.sf.hibernate.engine.SessionImplementor;
import net.sf.hibernate.engine.TypedValue;
- import net.sf.hibernate.util.ArrayHelper;
- import net.sf.hibernate.util.JDBCExceptionReporter;
- import net.sf.hibernate.util.ReflectHelper;
- import net.sf.hibernate.util.StringHelper;
import net.sf.hibernate.impl.IteratorImpl;
import net.sf.hibernate.impl.ScrollableResultsImpl;
- import net.sf.hibernate.engine.TypedValue;
import net.sf.hibernate.loader.Loader;
! import net.sf.hibernate.persister.*;
import net.sf.hibernate.type.EntityType;
import net.sf.hibernate.type.Type;
/**
--- 26,45 ----
import net.sf.hibernate.engine.SessionImplementor;
import net.sf.hibernate.engine.TypedValue;
import net.sf.hibernate.impl.IteratorImpl;
import net.sf.hibernate.impl.ScrollableResultsImpl;
import net.sf.hibernate.loader.Loader;
! import net.sf.hibernate.loader.OuterJoinLoader;
! import net.sf.hibernate.loader.OuterJoinLoader.OuterJoinableAssociation;
! import net.sf.hibernate.persister.Loadable;
! import net.sf.hibernate.persister.Queryable;
import net.sf.hibernate.type.EntityType;
import net.sf.hibernate.type.Type;
+ import net.sf.hibernate.util.ArrayHelper;
+ import net.sf.hibernate.util.JDBCExceptionReporter;
+ import net.sf.hibernate.util.ReflectHelper;
+ import net.sf.hibernate.util.StringHelper;
+
+ import org.apache.commons.logging.Log;
+ import org.apache.commons.logging.LogFactory;
/**
***************
*** 105,108 ****
--- 107,111 ----
protected boolean compiled;
+ private boolean hasScalars;
private boolean shallowQuery;
private QueryTranslator superQuery;
***************
*** 195,199 ****
protected boolean hasScalarValues() {
! return types.length!=persisters.length;
}
--- 198,202 ----
protected boolean hasScalarValues() {
! return hasScalars;
}
***************
*** 419,422 ****
--- 422,427 ----
}
+ private List associations;
+
private void renderSQL() throws QueryException, MappingException {
***************
*** 426,437 ****
}
int size = returnTypes.size();
!
! persisters = new Queryable[size];
! suffixes = new String[size];
! for ( int i=0; i<size; i++ ) {
! String name = (String) returnTypes.get(i);
if ( !isName(name) ) throw new QueryException("unknown type: " + name);
! persisters[i] = getPersisterForName(name);
! suffixes[i] = (size==1) ? "" : Integer.toString(i);
}
--- 431,475 ----
}
int size = returnTypes.size();
!
! String outerJoinedProperties=null;
! String outerJoinsAfterFrom=null;
! String outerJoinsAfterWhere=null;
! String selectProperties;
! String selectIdentifiers;
! if ( !isShallowQuery() && size==1 ) {
! OuterJoinLoader ojl = new OuterJoinLoader( factory.getDialect() );
! String name = (String) returnTypes.get(0);
if ( !isName(name) ) throw new QueryException("unknown type: " + name);
! Queryable persister = getPersisterForName(name);
! associations = ojl.walkTree(persister, name, factory);
! int joins=associations.size();
! String[] ojsuffixes = new String[joins];
! ojl.setSuffixed(ojsuffixes);
! for ( int i=0; i<joins; i++ ) ojsuffixes[i] = Integer.toString(i);
! selectProperties = persister.propertySelectClauseFragment(name, "");
! selectIdentifiers = persister.selectIdentifierString(name, "");
! outerJoinedProperties = ojl.selectString(associations);
! outerJoinsAfterFrom = ojl.outerJoinsAfterFrom(associations);
! outerJoinsAfterWhere = ojl.outerJoinsAfterWhere(associations);
! persisters = new Queryable[joins+1];
! suffixes = new String[joins+1];
! persisters[joins] = persister;
! suffixes[joins] = "";
! for ( int i=0; i<joins; i++ ) {
! suffixes[i] = Integer.toString(i);
! persisters[i] = (Queryable) ( (OuterJoinableAssociation) associations.get(i) ).subpersister; //TODO: dont like the typecast to Queryable
! }
! }
! else {
! persisters = new Queryable[size];
! suffixes = new String[size];
! for ( int i=0; i<size; i++ ) {
! String name = (String) returnTypes.get(i);
! if ( !isName(name) ) throw new QueryException("unknown type: " + name);
! persisters[i] = getPersisterForName(name);
! suffixes[i] = (size==1) ? "" : Integer.toString(i);
! }
! selectProperties = renderPropertiesSelect();
! selectIdentifiers = renderIdentifierSelect();
}
***************
*** 440,452 ****
String selectScalars = renderScalarSelect();
scalarSelectString = selectPerhapsDistinct + selectScalars;
! String selectIdentifiers = renderIdentifierSelect();
! selectPropertiesString = selectPerhapsDistinct + selectIdentifiers + renderPropertiesSelect();
//TODO: for some dialiects it would be appropriate to add the renderOrderByPropertiesSelect() to other select strings
! fromWhereString = renderFromClause() + renderWhereClause();
if ( scalarTypes.size()!=size ) {
if (size!=0) selectPropertiesString += ", ";
selectPropertiesString += selectScalars;
}
int scalarSize = scalarTypes.size();
--- 478,497 ----
String selectScalars = renderScalarSelect();
scalarSelectString = selectPerhapsDistinct + selectScalars;
! selectPropertiesString = selectPerhapsDistinct + selectIdentifiers + selectProperties;
! if ( outerJoinedProperties!=null && outerJoinedProperties.length() > 0 ) selectPropertiesString += ", " + outerJoinedProperties;
//TODO: for some dialiects it would be appropriate to add the renderOrderByPropertiesSelect() to other select strings
! fromWhereString = renderFromClause();
! if (outerJoinsAfterFrom!=null) fromWhereString += outerJoinsAfterFrom;
! if (outerJoinsAfterWhere!=null) fromWhereString += outerJoinsAfterWhere;
! fromWhereString += renderWhereClause();
if ( scalarTypes.size()!=size ) {
+ hasScalars=true;
if (size!=0) selectPropertiesString += ", ";
selectPropertiesString += selectScalars;
}
+ else {
+ hasScalars=false;
+ }
int scalarSize = scalarTypes.size();
***************
*** 879,882 ****
--- 924,964 ----
return names;
}
+
+ public final List find(
+ SessionImplementor session,
+ Object[] values,
+ Type[] types,
+ boolean returnProxies,
+ RowSelection selection,
+ Map namedParams)
+ throws SQLException, HibernateException {
+ return super.find(session, values, types, returnProxies, selection, namedParams);
+ }
+
+ protected Object getResultColumnOrRow(Object[] row, ResultSet rs, SessionImplementor session) throws SQLException, HibernateException {
+ Type[] returnTypes = getReturnTypes();
+ if (hasScalars) {
+ String[][] names = getScalarColumnNames();
+ int queryCols = returnTypes.length;
+ if ( queryCols==1 ) {
+ return returnTypes[0].nullSafeGet( rs, names[0], session, null );
+ }
+ else {
+ Object[] queryRow = new Object[queryCols];
+ for ( int i=0; i<queryCols; i++ )
+ queryRow[i] = returnTypes[i].nullSafeGet( rs, names[i], session, null );
+ return queryRow;
+ }
+ }
+ else if ( returnTypes.length==1 && persisters.length>1 ) {
+ // we are doing some outerjoining
+ return row[ persisters.length-1 ];
+ }
+ else {
+ return (row.length==1) ? row[0] : row;
+ }
+
+ }
+
}
|
|
From: <one...@us...> - 2003-01-18 09:01:13
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/loader
In directory sc8-pr-cvs1:/tmp/cvs-serv29261/hibernate/loader
Modified Files:
OuterJoinLoader.java
Log Message:
fixed a very minor issue in generated SQL
Index: OuterJoinLoader.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/loader/OuterJoinLoader.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** OuterJoinLoader.java 15 Jan 2003 12:52:40 -0000 1.16
--- OuterJoinLoader.java 18 Jan 2003 09:01:10 -0000 1.17
***************
*** 73,86 ****
Type type = persister.getElementType();
- String[] columns = StringHelper.prefix( persister.getElementColumnNames(), alias + '.' );
if ( type.isEntityType() ) {
EntityType etype = (EntityType) type;
if ( autoEager( persister.enableJoinedFetch(), etype, session ) ) {
// fetch many-to-many by outerjoin depending value of outer-join in mapping
walkTree(etype, columns, persister, associations, new HashSet(), session);
}
}
else if ( type.isComponentType() ) {
! walkTree( (AbstractComponentType) type, columns, persister, alias, associations, new HashSet(), session);
}
--- 73,86 ----
Type type = persister.getElementType();
if ( type.isEntityType() ) {
EntityType etype = (EntityType) type;
if ( autoEager( persister.enableJoinedFetch(), etype, session ) ) {
// fetch many-to-many by outerjoin depending value of outer-join in mapping
+ String[] columns = StringHelper.prefix( persister.getElementColumnNames(), alias + '.' );
walkTree(etype, columns, persister, associations, new HashSet(), session);
}
}
else if ( type.isComponentType() ) {
! walkTree( (AbstractComponentType) type, persister.getElementColumnNames(), persister, alias, associations, new HashSet(), session);
}
***************
*** 143,148 ****
if ( types[i].isEntityType() ) {
EntityType etype = (EntityType) types[i];
! if ( autoEager( act.enableJoinedFetch(i), etype, session ) )
! walkTree(etype, range, persister, associations, classPersisters, session);
}
else if ( types[i].isComponentType() ) {
--- 143,150 ----
if ( types[i].isEntityType() ) {
EntityType etype = (EntityType) types[i];
! if ( autoEager( act.enableJoinedFetch(i), etype, session ) ) {
! String[] columns = StringHelper.prefix(range, alias + '.');
! walkTree(etype, columns, persister, associations, classPersisters, session);
! }
}
else if ( types[i].isComponentType() ) {
|
|
From: <one...@us...> - 2003-01-17 23:53:39
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools In directory sc8-pr-cvs1:/tmp/cvs-serv19712/hibernate/tools Modified Files: SchemaExport.java Log Message: fixed a bug where delimiter was sometimes not appended Index: SchemaExport.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools/SchemaExport.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** SchemaExport.java 19 Dec 2002 11:29:03 -0000 1.14 --- SchemaExport.java 17 Jan 2003 23:53:29 -0000 1.15 *************** *** 2,8 **** package cirrus.hibernate.tools; ! import java.io.*; ! import java.sql.*; ! import java.util.*; import cirrus.hibernate.Datastore; --- 2,13 ---- package cirrus.hibernate.tools; ! import java.io.FileInputStream; ! import java.io.FileWriter; ! import java.io.IOException; ! import java.sql.Connection; ! import java.sql.SQLException; ! import java.sql.Statement; ! import java.util.Properties; ! import java.util.StringTokenizer; import cirrus.hibernate.Datastore; *************** *** 10,14 **** import cirrus.hibernate.Hibernate; import cirrus.hibernate.HibernateException; ! import cirrus.hibernate.connection.*; import cirrus.hibernate.helpers.JDBCExceptionReporter; import cirrus.hibernate.sql.Dialect; --- 15,20 ---- import cirrus.hibernate.Hibernate; import cirrus.hibernate.HibernateException; ! import cirrus.hibernate.connection.ConnectionProvider; ! import cirrus.hibernate.connection.ConnectionProviderFactory; import cirrus.hibernate.helpers.JDBCExceptionReporter; import cirrus.hibernate.sql.Dialect; *************** *** 124,128 **** for(int j = 0; j < createSQL.length; j++) { try { ! String formatted = format ? format( createSQL[j], delimiter ) : createSQL[j]; if (script) System.out.println( formatted ); if (outputFile != null) fileOutput.write( formatted + "\n" ); --- 130,135 ---- for(int j = 0; j < createSQL.length; j++) { try { ! String formatted = format ? format( createSQL[j] ) : createSQL[j]; ! if (delimiter!=null) formatted+=delimiter; if (script) System.out.println( formatted ); if (outputFile != null) fileOutput.write( formatted + "\n" ); *************** *** 179,187 **** * a) Insert newline after each comma; * b) Indent three spaces after each inserted newline; - * c) Append an optional delimiter to the SQL statement. * If the statement contains single/double quotes return unchanged, * it is too complex and could be broken by simple formatting. */ ! private static String format(String sql, String delimiter) { if ( sql.indexOf("\"") > 0 || sql.indexOf("'") > 0) { --- 186,193 ---- * a) Insert newline after each comma; * b) Indent three spaces after each inserted newline; * If the statement contains single/double quotes return unchanged, * it is too complex and could be broken by simple formatting. */ ! private static String format(String sql) { if ( sql.indexOf("\"") > 0 || sql.indexOf("'") > 0) { *************** *** 189,193 **** } ! final String formatted; if ( sql.toLowerCase().startsWith("create table") ) { --- 195,199 ---- } ! String formatted; if ( sql.toLowerCase().startsWith("create table") ) { *************** *** 219,223 **** } ! return (delimiter!=null) ? formatted + delimiter : formatted; } --- 225,229 ---- } ! return formatted; } |
|
From: <one...@us...> - 2003-01-17 23:53:01
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/tool/hbm2ddl In directory sc8-pr-cvs1:/tmp/cvs-serv19525/sf/hibernate/tool/hbm2ddl Modified Files: SchemaExport.java Log Message: fixed a bug where delimiter was sometimes not appended Index: SchemaExport.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/tool/hbm2ddl/SchemaExport.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SchemaExport.java 5 Jan 2003 02:11:23 -0000 1.3 --- SchemaExport.java 17 Jan 2003 23:52:57 -0000 1.4 *************** *** 2,8 **** package net.sf.hibernate.tool.hbm2ddl; ! import java.io.*; ! import java.sql.*; ! import java.util.*; import net.sf.hibernate.Environment; --- 2,13 ---- package net.sf.hibernate.tool.hbm2ddl; ! import java.io.FileInputStream; ! import java.io.FileWriter; ! import java.io.IOException; ! import java.sql.Connection; ! import java.sql.SQLException; ! import java.sql.Statement; ! import java.util.Properties; ! import java.util.StringTokenizer; import net.sf.hibernate.Environment; *************** *** 10,16 **** import net.sf.hibernate.HibernateException; import net.sf.hibernate.cfg.Datastore; ! import net.sf.hibernate.connection.*; ! import net.sf.hibernate.util.JDBCExceptionReporter; import net.sf.hibernate.dialect.Dialect; /** --- 15,22 ---- import net.sf.hibernate.HibernateException; import net.sf.hibernate.cfg.Datastore; ! import net.sf.hibernate.connection.ConnectionProvider; ! import net.sf.hibernate.connection.ConnectionProviderFactory; import net.sf.hibernate.dialect.Dialect; + import net.sf.hibernate.util.JDBCExceptionReporter; /** *************** *** 102,106 **** try { String formatted = dropSQL[i]; ! if (delimiter!=null) formatted+=delimiter; if (script) System.out.println(formatted); if (outputFile != null) fileOutput.write( formatted + "\n" ); --- 108,112 ---- try { String formatted = dropSQL[i]; ! if (delimiter!=null) formatted += delimiter; if (script) System.out.println(formatted); if (outputFile != null) fileOutput.write( formatted + "\n" ); *************** *** 124,128 **** for(int j = 0; j < createSQL.length; j++) { try { ! String formatted = format ? format( createSQL[j], delimiter ) : createSQL[j]; if (script) System.out.println( formatted ); if (outputFile != null) fileOutput.write( formatted + "\n" ); --- 130,135 ---- for(int j = 0; j < createSQL.length; j++) { try { ! String formatted = format ? format( createSQL[j] ) : createSQL[j]; ! if (delimiter!=null) formatted += delimiter; if (script) System.out.println( formatted ); if (outputFile != null) fileOutput.write( formatted + "\n" ); *************** *** 179,187 **** * a) Insert newline after each comma; * b) Indent three spaces after each inserted newline; - * c) Append an optional delimiter to the SQL statement. * If the statement contains single/double quotes return unchanged, * it is too complex and could be broken by simple formatting. */ ! private static String format(String sql, String delimiter) { if ( sql.indexOf("\"") > 0 || sql.indexOf("'") > 0) { --- 186,193 ---- * a) Insert newline after each comma; * b) Indent three spaces after each inserted newline; * If the statement contains single/double quotes return unchanged, * it is too complex and could be broken by simple formatting. */ ! private static String format(String sql) { if ( sql.indexOf("\"") > 0 || sql.indexOf("'") > 0) { *************** *** 189,193 **** } ! final String formatted; if ( sql.toLowerCase().startsWith("create table") ) { --- 195,199 ---- } ! String formatted; if ( sql.toLowerCase().startsWith("create table") ) { *************** *** 219,223 **** } ! return (delimiter!=null) ? formatted + delimiter : formatted; } --- 225,229 ---- } ! return formatted; } |
|
From: <one...@us...> - 2003-01-17 23:38:42
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/id
In directory sc8-pr-cvs1:/tmp/cvs-serv14638/sf/hibernate/id
Modified Files:
SequenceHiLoGenerator.java
Log Message:
fixed bug where seqhilo was looking for wrong parameter
Index: SequenceHiLoGenerator.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/id/SequenceHiLoGenerator.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** SequenceHiLoGenerator.java 9 Jan 2003 12:24:50 -0000 1.4
--- SequenceHiLoGenerator.java 17 Jan 2003 23:38:38 -0000 1.5
***************
*** 32,36 ****
public class SequenceHiLoGenerator extends SequenceGenerator {
! public static final String SEQUENCE = "sequence";
private static final Log log = LogFactory.getLog(SequenceHiLoGenerator.class);
--- 32,36 ----
public class SequenceHiLoGenerator extends SequenceGenerator {
! public static final String MAX_LO = "max_lo";
private static final Log log = LogFactory.getLog(SequenceHiLoGenerator.class);
***************
*** 43,47 ****
public void configure(Type type, Properties params, Dialect d) throws MappingException {
super.configure(type, params, d);
! lo = maxLoValue = PropertiesHelper.getInt(SEQUENCE, params, 9);
returnClass = type.returnedClass();
}
--- 43,47 ----
public void configure(Type type, Properties params, Dialect d) throws MappingException {
super.configure(type, params, d);
! lo = maxLoValue = PropertiesHelper.getInt(MAX_LO, params, 9);
returnClass = type.returnedClass();
}
|
|
From: <one...@us...> - 2003-01-17 10:32:30
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/persister
In directory sc8-pr-cvs1:/tmp/cvs-serv19213/net/sf/hibernate/persister
Modified Files:
EntityPersister.java MultiTableEntityPersister.java
Log Message:
added Query.getQueryString() and an exception message
Index: EntityPersister.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/persister/EntityPersister.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** EntityPersister.java 9 Jan 2003 12:24:51 -0000 1.4
--- EntityPersister.java 17 Jan 2003 10:32:27 -0000 1.5
***************
*** 108,111 ****
--- 108,112 ----
AbstractComponentType actype = (AbstractComponentType) idType;
String[] props = actype.getPropertyNames();
+ if (props.length!=columns.length) throw new MappingException("broken mapping for: " + getClassName() + '.' + path);
for ( int i=0; i<props.length; i++ ) {
String subidpath = idpath + '.' + props[i];
Index: MultiTableEntityPersister.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/persister/MultiTableEntityPersister.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** MultiTableEntityPersister.java 9 Jan 2003 12:24:51 -0000 1.4
--- MultiTableEntityPersister.java 17 Jan 2003 10:32:27 -0000 1.5
***************
*** 130,133 ****
--- 130,134 ----
AbstractComponentType actype = (AbstractComponentType) idType;
String[] props = actype.getPropertyNames();
+ if (props.length!=columns.length) throw new MappingException("broken mapping for: " + getClassName() + '.' + path);
for ( int i=0; i<props.length; i++ ) {
String subidpath = idpath + '.' + props[i];
|
|
From: <one...@us...> - 2003-01-17 10:27:44
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/impl
In directory sc8-pr-cvs1:/tmp/cvs-serv18718/net/sf/hibernate/impl
Modified Files:
QueryImpl.java
Log Message:
added Query.getQueryString() and an exception message
Index: QueryImpl.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/impl/QueryImpl.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** QueryImpl.java 14 Jan 2003 13:42:12 -0000 1.5
--- QueryImpl.java 17 Jan 2003 10:27:41 -0000 1.6
***************
*** 335,339 ****
}
! String getQueryString() {
return queryString;
}
--- 335,339 ----
}
! public String getQueryString() {
return queryString;
}
|
|
From: <one...@us...> - 2003-01-17 10:27:44
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate
In directory sc8-pr-cvs1:/tmp/cvs-serv18718/net/sf/hibernate
Modified Files:
Query.java
Log Message:
added Query.getQueryString() and an exception message
Index: Query.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/Query.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Query.java 14 Jan 2003 14:07:02 -0000 1.5
--- Query.java 17 Jan 2003 10:27:41 -0000 1.6
***************
*** 53,56 ****
--- 53,62 ----
public interface Query {
/**
+ * Get the query string.
+ *
+ * @return the query string
+ */
+ public String getQueryString();
+ /**
* Return the Hibernate types of the query result set.
* @return an array of types
|
|
From: <one...@us...> - 2003-01-17 10:27:44
|
Update of /cvsroot/hibernate/Hibernate2/src In directory sc8-pr-cvs1:/tmp/cvs-serv18718 Modified Files: hibernate.properties Log Message: added Query.getQueryString() and an exception message Index: hibernate.properties =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/hibernate.properties,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** hibernate.properties 16 Jan 2003 20:52:38 -0000 1.11 --- hibernate.properties 17 Jan 2003 10:27:41 -0000 1.12 *************** *** 26,44 **** ## PostgreSQL ! hibernate.dialect net.sf.hibernate.dialect.PostgreSQLDialect ! hibernate.connection.driver_class org.postgresql.Driver ! hibernate.connection.url jdbc:postgresql:template1 ! hibernate.connection.username pg ! hibernate.connection.password ! hibernate.query.substitutions yes 'Y', no 'N' ## DB2 ! #hibernate.dialect net.sf.hibernate.dialect.DB2Dialect ! #hibernate.connection.driver_class COM.ibm.db2.jdbc.app.DB2Driver ! #hibernate.connection.url jdbc:db2:test ! #hibernate.connection.username db2 ! #hibernate.connection.password db2 --- 26,44 ---- ## PostgreSQL ! #hibernate.dialect net.sf.hibernate.dialect.PostgreSQLDialect ! #hibernate.connection.driver_class org.postgresql.Driver ! #hibernate.connection.url jdbc:postgresql:template1 ! #hibernate.connection.username pg ! #hibernate.connection.password ! #hibernate.query.substitutions yes 'Y', no 'N' ## DB2 ! hibernate.dialect net.sf.hibernate.dialect.DB2Dialect ! hibernate.connection.driver_class COM.ibm.db2.jdbc.app.DB2Driver ! hibernate.connection.url jdbc:db2:test ! hibernate.connection.username db2 ! hibernate.connection.password db2 |
|
From: <one...@us...> - 2003-01-17 10:27:13
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/impl
In directory sc8-pr-cvs1:/tmp/cvs-serv18644/cirrus/hibernate/impl
Modified Files:
QueryImpl.java
Log Message:
added Query.getQueryString() and an exception message
Index: QueryImpl.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/impl/QueryImpl.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** QueryImpl.java 28 Dec 2002 02:25:49 -0000 1.22
--- QueryImpl.java 17 Jan 2003 10:27:10 -0000 1.23
***************
*** 332,334 ****
--- 332,338 ----
}
+ public String getQueryString() {
+ return queryString;
+ }
+
}
|
|
From: <one...@us...> - 2003-01-17 10:27:13
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate
In directory sc8-pr-cvs1:/tmp/cvs-serv18644/cirrus/hibernate
Modified Files:
Query.java
Log Message:
added Query.getQueryString() and an exception message
Index: Query.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/Query.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** Query.java 28 Dec 2002 02:25:48 -0000 1.18
--- Query.java 17 Jan 2003 10:27:10 -0000 1.19
***************
*** 53,56 ****
--- 53,62 ----
public interface Query {
/**
+ * Get the query string.
+ *
+ * @return the query string
+ */
+ public String getQueryString();
+ /**
* Return the Hibernate types of the query result set.
* @return an array of types
|
|
From: <one...@us...> - 2003-01-17 10:27:13
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/persister
In directory sc8-pr-cvs1:/tmp/cvs-serv18644/cirrus/hibernate/persister
Modified Files:
EntityPersister.java MultiTableEntityPersister.java
Log Message:
added Query.getQueryString() and an exception message
Index: EntityPersister.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/persister/EntityPersister.java,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** EntityPersister.java 9 Jan 2003 09:40:19 -0000 1.48
--- EntityPersister.java 17 Jan 2003 10:27:10 -0000 1.49
***************
*** 107,110 ****
--- 107,111 ----
AbstractComponentType actype = (AbstractComponentType) idType;
String[] props = actype.getPropertyNames();
+ if (props.length!=columns.length) throw new MappingException("broken mapping for: " + getClassName() + '.' + path);
for ( int i=0; i<props.length; i++ ) {
String subidpath = idpath + '.' + props[i];
Index: MultiTableEntityPersister.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/persister/MultiTableEntityPersister.java,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** MultiTableEntityPersister.java 9 Jan 2003 09:40:19 -0000 1.46
--- MultiTableEntityPersister.java 17 Jan 2003 10:27:10 -0000 1.47
***************
*** 128,131 ****
--- 128,132 ----
AbstractComponentType actype = (AbstractComponentType) idType;
String[] props = actype.getPropertyNames();
+ if (props.length!=columns.length) throw new MappingException("broken mapping for: " + getClassName() + '.' + path);
for ( int i=0; i<props.length; i++ ) {
String subidpath = idpath + '.' + props[i];
|
|
From: <one...@us...> - 2003-01-17 08:57:22
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/helpers
In directory sc8-pr-cvs1:/tmp/cvs-serv10144/hibernate/helpers
Modified Files:
StringHelper.java
Log Message:
disabled the long column names feature, which broke things
Index: StringHelper.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/helpers/StringHelper.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** StringHelper.java 9 Jan 2003 09:47:37 -0000 1.19
--- StringHelper.java 17 Jan 2003 08:52:27 -0000 1.20
***************
*** 97,108 ****
public static String suffix(String name, String suffix) {
! if (suffix==null) {
! /*if (name.length() > 20) {
! return name.substring(name.length()-20);
! }
! else {*/
! return name;
! //}
! }
char quote = name.charAt(0);
--- 97,101 ----
public static String suffix(String name, String suffix) {
! if (suffix==null) return name;
char quote = name.charAt(0);
***************
*** 116,123 ****
nameBuffer.append(name).append(suffix);
}
! if (nameBuffer.length() > 15) {
nameBuffer.delete(0, nameBuffer.length()-15);
if ( !Character.isLetter( nameBuffer.charAt(0) ) ) nameBuffer.setCharAt(0, 'x');
! }
if (nameEscaped) {
nameBuffer.insert(0, quote);
--- 109,116 ----
nameBuffer.append(name).append(suffix);
}
! /*if (nameBuffer.length() > 15) {
nameBuffer.delete(0, nameBuffer.length()-15);
if ( !Character.isLetter( nameBuffer.charAt(0) ) ) nameBuffer.setCharAt(0, 'x');
! }*/
if (nameEscaped) {
nameBuffer.insert(0, quote);
|
|
From: <one...@us...> - 2003-01-17 08:52:20
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/util
In directory sc8-pr-cvs1:/tmp/cvs-serv10086/sf/hibernate/util
Modified Files:
StringHelper.java
Log Message:
disabled the long column names feature, which broke things
Index: StringHelper.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/util/StringHelper.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** StringHelper.java 9 Jan 2003 12:24:52 -0000 1.4
--- StringHelper.java 17 Jan 2003 08:51:39 -0000 1.5
***************
*** 97,108 ****
public static String suffix(String name, String suffix) {
! if (suffix==null) {
! /*if (name.length() > 20) {
! return name.substring(name.length()-20);
! }
! else {*/
! return name;
! //}
! }
char quote = name.charAt(0);
--- 97,101 ----
public static String suffix(String name, String suffix) {
! if (suffix==null) return name;
char quote = name.charAt(0);
***************
*** 117,124 ****
}
! if (nameBuffer.length() > 15) {
nameBuffer.delete(0, nameBuffer.length()-15);
if ( !Character.isLetter( nameBuffer.charAt(0) ) ) nameBuffer.setCharAt(0, 'x');
! }
if (nameEscaped) {
--- 110,117 ----
}
! /*if (nameBuffer.length() > 15) {
nameBuffer.delete(0, nameBuffer.length()-15);
if ( !Character.isLetter( nameBuffer.charAt(0) ) ) nameBuffer.setCharAt(0, 'x');
! }*/
if (nameEscaped) {
|
|
From: <one...@us...> - 2003-01-17 08:45:38
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/src
In directory sc8-pr-cvs1:/tmp/cvs-serv9067/reference/src
Modified Files:
advanced_or_mapping.xml
Log Message:
improved collections doco
Index: advanced_or_mapping.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/src/advanced_or_mapping.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** advanced_or_mapping.xml 16 Jan 2003 08:56:02 -0000 1.5
--- advanced_or_mapping.xml 17 Jan 2003 08:38:05 -0000 1.6
***************
*** 7,11 ****
<sect2 id="adv-or-mapping-s1-1">
! <title>Persistent Collection Styles</title>
<para>
--- 7,11 ----
<sect2 id="adv-or-mapping-s1-1">
! <title>Persistent Collections</title>
<para>
***************
*** 28,31 ****
--- 28,32 ----
may also be persisted with "bag" semantics.
</para>
+
<para>
Now the caveat: persistent collections do not retain any extra semantics added by the class
***************
*** 65,72 ****
<para>
! Collections may contain any other Hibernate type. All collection types except
! <literal>Set</literal> and bag have an <emphasis>index</emphasis> - an array or list
! index or map key. The index of a <literal>Map</literal> may be of any basic type, an
! entity type or even a composite type (it may not be a collection).
</para>
--- 66,93 ----
<para>
! Collection instances are distinguished in the database by a foreign key to
! the owning entity. This foreign key is referred to as the <emphasis>collection key
! </emphasis> (Collections may not contain other collections). The collection key
! is mapped by the <literal><key></literal> element.
! </para>
!
! <para>
! Collections may contain almost any other Hibernate type, including all basic types,
! custom types, entity types and components. Collections may not contain other
! collections. The contained type is referred to as the emphasis>collection element
! type</emphasis>. Collection elements are mapped by using <literal><element></literal>,
! <literal><composite-element></literal>, <literal><one-to-many></literal> or
! <literal><many-to-many></literal>.
! </para>
! </para>
!
! <para>
! All collection types except <literal>Set</literal> and bag have an <emphasis>index
! </emphasis> column - a column that maps to an array or <literal>List</literal> index or
! <literal>Map</literal> key. The index of a <literal>Map</literal> may be of any
! basic type, an entity type or even a composite type (it may not be a collection). The
! index of an array or list is always of type <literal>integer</literal>. Indexes are
! mapped using <literal><index></literal>, <literal><index-many-to-many></literal>
! or <literal><composite-index></literal>.
</para>
***************
*** 77,90 ****
translate to database tables.
</para>
- </sect2>
-
-
- <sect2 id="adv-or-mapping-s1-2">
- <title>Collections Keys</title>
-
- <para>
- Collection instances are distinguished in the database by a foreign key to
- the owning object. (Hence collections may not contain other collections.)
- </para>
</sect2>
--- 98,101 ----
***************
*** 110,113 ****
--- 121,125 ----
schema="schema_name
lazy="true|false"
+ inverse="true|false"
cascade="all|none|save-update|delete"
sort="unsorted|natural|comparatorClass"
***************
*** 145,148 ****
--- 157,166 ----
<listitem>
<para>
+ <literal>inverse</literal> (optional - defaults to <literal>false</literal>)
+ mark this collection as the "inverse" end of a bidirectional association
+ </para>
+ </listitem>
+ <listitem>
+ <para>
<literal>cascade</literal> (optional - defaults to <literal>none</literal>)
enable operations to cascade to child entities (not used for toplevel
***************
*** 170,178 ****
<para>
! Most collection roles require a table of their own. This includes any collection
! of values and any collection of entities that has the natural semantics for a
! Java collection. The table requires an identifier column, an element column (or
! column<emphasis>s</emphasis> if it is a collection of components) and possibly
! an index column.
</para>
--- 188,194 ----
<para>
! A collection table is required for any collection of values and any collection of entities
! mapped as a many-to-many association (the natural semantics for a Java collection). The
! table requires identifier column(s), element column(s) and possibly index column(s).
</para>
***************
*** 180,184 ****
A collection of entities with its own table corresponds to the relational notion
of <emphasis>many-to-many association</emphasis>. A many to many association is the
! most natural mapping of a Java collection but is not always the best relational model.
</para>
--- 196,200 ----
A collection of entities with its own table corresponds to the relational notion
of <emphasis>many-to-many association</emphasis>. A many to many association is the
! most natural mapping of a Java collection but is not usually the best relational model.
</para>
|
|
From: <one...@us...> - 2003-01-16 20:55:28
|
Update of /cvsroot/hibernate/Hibernate2/doc/reference/src
In directory sc8-pr-cvs1:/tmp/cvs-serv9086/reference/src
Modified Files:
basic_or_mapping.xml manipulating_data.xml
Log Message:
minor fixes
Index: basic_or_mapping.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/src/basic_or_mapping.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** basic_or_mapping.xml 16 Jan 2003 08:28:45 -0000 1.2
--- basic_or_mapping.xml 16 Jan 2003 20:55:25 -0000 1.3
***************
*** 942,946 ****
<class name="eg.Cat" table="CATS">
<id name="id" column="uid" type="long">
! <generator class="hilo.long"/>
</id>
<property name="birthdate" type="date"/>
--- 942,946 ----
<class name="eg.Cat" table="CATS">
<id name="id" column="uid" type="long">
! <generator class="hilo"/>
</id>
<property name="birthdate" type="date"/>
***************
*** 959,964 ****
</class>
! <class name="eg.Baz">
! <!-- mapping for Baz goes here -->
</class>
--- 959,964 ----
</class>
! <class name="eg.Dog">
! <!-- mapping for Dog could go here -->
</class>
Index: manipulating_data.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/doc/reference/src/manipulating_data.xml,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** manipulating_data.xml 1 Jan 2003 13:46:32 -0000 1.1.1.1
--- manipulating_data.xml 16 Jan 2003 20:55:25 -0000 1.2
***************
*** 439,443 ****
<programlisting><![CDATA[<id name="id" type="long" column="uid" unsaved-value="null">
! <generator class="hilo.long"/>
</id>]]></programlisting>
--- 439,443 ----
<programlisting><![CDATA[<id name="id" type="long" column="uid" unsaved-value="null">
! <generator class="hilo"/>
</id>]]></programlisting>
|
|
From: <one...@us...> - 2003-01-16 20:54:58
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/tool/hbm2java/test In directory sc8-pr-cvs1:/tmp/cvs-serv8993a/net/sf/hibernate/tool/hbm2java/test Added Files: TestMeta.hbm.xml Log Message: applied Max Andersen's patch for <meta>attributes in hbm2java --- NEW FILE: TestMeta.hbm.xml --- <?xml version="1.0"?> <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> <class name="Person"> <meta attribute="description"> Javadoc for the class person @author Frodo </meta> <meta attribute="implements">Comparable</meta> <meta attribute="scope-class">abstract public</meta> <id name="id" type="long"> <meta attribute="scope-set">protected</meta> <generator class="vm.long"/> </id> <property name="name" type="string"> <meta attribute="description">The name of the person</meta> </property> </class> <class name="Parent"> <id name="id" type="long"> <meta attribute="scope-set">protected</meta> <generator class="vm.long"/> </id> <timestamp name="stamp" column="ts_"/> <set name="children" inverse="true" lazy="true"> <meta attribute="description">My lovely children, for which I would like an add and remove method...</meta> <key column="parent_key"/> <one-to-many class="other.Child"/> </set> <set name="moreChildren" cascade="all" lazy="true"> <key column="more_parent_key"> <column name="another_key"/> </key> <one-to-many class="other.Child"/> </set> </class> <class name="other.Child"> <meta attribute="generated-class">x.Child</meta> <id name="id" type="long"> <meta attribute="scope-set">protected</meta> <generator class="vm.long"/> </id> <version name="version"/> <many-to-one name="parent" column="parent_key" class="Parent"> <meta attribute="description">My beloved parent.</meta> </many-to-one> </class> </hibernate-mapping> |
|
From: <one...@us...> - 2003-01-16 20:54:58
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/tool/hbm2java
In directory sc8-pr-cvs1:/tmp/cvs-serv8993a/net/sf/hibernate/tool/hbm2java
Added Files:
MetaAttributeHelper.java
Log Message:
applied Max Andersen's patch for <meta>attributes in hbm2java
--- NEW FILE: MetaAttributeHelper.java ---
package net.sf.hibernate.tool.hbm2java;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.apache.commons.collections.MultiHashMap;
import org.apache.commons.collections.MultiMap;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jdom.Element;
/**
* Helper for loading, merging and accessing <meta> tags.
*
* @author max
*
*
*/
public class MetaAttributeHelper {
static private Log log = LogFactory.getLog(MetaAttributeHelper.class);
/**
* Load meta attributes from jdom element into a MultiMap.
*
* @param element
* @return MultiMap
*/
static protected MultiMap loadMetaMap(Element element) {
MultiMap result = new MultiHashMap();
List metaAttributeList = new ArrayList();
metaAttributeList.addAll(element.getChildren("meta"));
for (Iterator iter = metaAttributeList.iterator(); iter.hasNext();) {
Element metaAttrib = (Element) iter.next();
// does not use getTextNormalize() or getTextTrim() as that would remove the formatting in new lines in items like description for javadocs.
result.put(metaAttrib.getAttribute("attribute").getValue(), metaAttrib.getText());
}
return result;
}
/**
* Merges a Multimap with inherited maps.
* Values specified always overrules/replaces the inherited values.
*
* @param local
* @param inherited
* @return a MultiMap with all values from local and extra values
* from inherited
*/
static public MultiMap mergeMetaMaps(MultiMap local, MultiMap inherited) {
MultiHashMap result = new MultiHashMap();
if (inherited != null) {
result.putAll(local);
for (Iterator iter = inherited.keySet().iterator(); iter.hasNext();) {
String key = (String) iter.next();
if (!local.containsKey(key)) {
// inheriting a meta attribute
result.put(key, inherited.get(key));
}
}
}
return result;
}
/**
* Method loadAndMergeMetaMap.
* @param classElement
* @param inheritedMeta
* @return MultiMap
*/
public static MultiMap loadAndMergeMetaMap(Element classElement, MultiMap inheritedMeta) {
return mergeMetaMaps(loadMetaMap(classElement), inheritedMeta);
}
}
|
|
From: <one...@us...> - 2003-01-16 20:52:42
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/tool/hbm2java/test In directory sc8-pr-cvs1:/tmp/cvs-serv8417/net/sf/hibernate/tool/hbm2java/test Modified Files: Test.hbm.xml Test2.hbm.xml config.xml Log Message: applied Max Andersen's patch for <meta>attributes in hbm2java Index: Test.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/tool/hbm2java/test/Test.hbm.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Test.hbm.xml 1 Jan 2003 13:57:52 -0000 1.1.1.1 --- Test.hbm.xml 16 Jan 2003 20:52:38 -0000 1.2 *************** *** 1,15 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping.dtd" > <hibernate-mapping> <class name="codegen.test.BasicPrincipal" ! table="tblPrincipal" ! discriminator="subclass"> <id name="id" type="java.lang.String"> <generator class="uuid.hex"/> </id> <property name="name" ! type="java.lang.String"/> <property name="count" type="int"/> --- 1,25 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > <hibernate-mapping> + <meta attribute="scope-class">public</meta> + <meta attribute="scope-set">protected</meta> + <class name="codegen.test.BasicPrincipal" ! table="tblPrincipal"> ! <meta attribute="description"> ! BasicPrinicpal is just a basic principal. And it got some javadoc too! ! @see Guest ! @author xam ! </meta> <id name="id" type="java.lang.String"> <generator class="uuid.hex"/> </id> + <discriminator column="subclass"/> <property name="name" ! type="java.lang.String"> ! <meta attribute="description">An ordinary field with some more javadoc :)</meta> ! </property> <property name="count" type="int"/> *************** *** 30,46 **** </component> ! <array role="permissions" element-class="codegen.test.AbstractPermission"> <key column="principal"/> ! <index colum="order"/> <one-to-many class="codegen.test.Permission"/> </array> ! <primitive-array role="logins"> <key column="principal"/> ! <index colum="order"/> <element type="timestamp"/> </primitive-array> ! <bag role="names"> <key column="principal"/> <element type="string"/> --- 40,56 ---- </component> ! <array name="permissions" element-class="codegen.test.AbstractPermission"> <key column="principal"/> ! <index column="order"/> <one-to-many class="codegen.test.Permission"/> </array> ! <primitive-array name="logins"> <key column="principal"/> ! <index column="order"/> <element type="timestamp"/> </primitive-array> ! <bag name="names"> <key column="principal"/> <element type="string"/> *************** *** 48,51 **** --- 58,62 ---- <subclass name="codegen.test.User" proxy="codegen.test.IUser"> + <meta attribute="generated-class">codegen.auto.test.AutoUser</meta> <property name="email" type="string"/> *************** *** 55,59 **** <subclass name="codegen.test.Group"> ! <list role="members" table="tblGroupMembers"> <key column="groupId"/> --- 66,71 ---- <subclass name="codegen.test.Group"> ! <meta attribute="extends">codegen.test.AbstractPersistentWhichIsBogusBecauseItisAnSubclass</meta> ! <list name="members" table="tblGroupMembers"> <key column="groupId"/> *************** *** 68,73 **** <property name="simpleAttrib" type="string"/> ! <array role="otherGroups" element-class="codegen.test.User"> <key column="principal"/> <one-to-many class="codegen.test.User"/> </array> --- 80,86 ---- <property name="simpleAttrib" type="string"/> ! <array name="otherGroups" element-class="codegen.test.User"> <key column="principal"/> + <index column="idx"/> <one-to-many class="codegen.test.User"/> </array> *************** *** 76,83 **** </class> ! <class name="codegen.test.Person"> ! <id name="id" type="string"><generator class="assigned"/></id> ! <one-to-one name="myUser" class="codegen.test.User"/> ! </class> </hibernate-mapping> --- 89,112 ---- </class> ! <class name="codegen.test.Person"> ! <meta attribute="extends">codegen.test.AbstractPersistent</meta> ! <meta attribute="implements">codegen.test.IVersionable</meta> ! <meta attribute="implements">codegen.test.IAuditable</meta> ! <meta attribute="generated-class">codegen.test.AutoPerson</meta> ! <meta attribute="description"> ! AutoPerson is a simple class, which illustrates the possibilities of the Hibernate meta tag. ! @author Zim Zala Bim ! </meta> ! ! <id name="id" type="string"><generator class="assigned"/></id> ! <one-to-one name="myUser" class="codegen.test.User"/> ! <property name="name" type="string"> ! <meta attribute="scope-get">public</meta> ! <meta attribute="scope">protected</meta> ! <meta attribute="description">A javadoc comment for the field name...</meta> ! </property> ! <property name="aDate" type="date"> ! </property> ! </class> </hibernate-mapping> Index: Test2.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/tool/hbm2java/test/Test2.hbm.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Test2.hbm.xml 9 Jan 2003 12:24:52 -0000 1.2 --- Test2.hbm.xml 16 Jan 2003 20:52:38 -0000 1.3 *************** *** 1,4 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-1.1.dtd" > --- 1,4 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" > *************** *** 36,41 **** <property name="one" type="big_decimal" not-null="true"/> <property name="two" type="string"/> ! <set role="recursiveColl"> ! <key type="long" column="bcid"/> <one-to-many class="codegen.test.BothConstructors"/> </set> --- 36,41 ---- <property name="one" type="big_decimal" not-null="true"/> <property name="two" type="string"/> ! <set name="recursiveColl"> ! <key column="bcid"/> <one-to-many class="codegen.test.BothConstructors"/> </set> Index: config.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/tool/hbm2java/test/config.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** config.xml 13 Jan 2003 08:57:43 -0000 1.2 --- config.xml 16 Jan 2003 20:52:38 -0000 1.3 *************** *** 1,2 **** --- 1,3 ---- + <?xml version="1.0"?> <!-- <generate renderer="" *************** *** 8,11 **** --> <codegen> ! <generate renderer="net.sf.hibernate.tool.hbm2java.BasicRenderer"/> </codegen> --- 9,13 ---- --> <codegen> ! <meta attribute="implements">codegen.test.IAuditable</meta> ! <generate renderer="net.sf.hibernate.tool.hbm2java.BasicRenderer"/> </codegen> |
|
From: <one...@us...> - 2003-01-16 20:52:41
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/eg
In directory sc8-pr-cvs1:/tmp/cvs-serv8417/net/sf/hibernate/eg
Modified Files:
Edge.hbm.xml Vertex.hbm.xml
Log Message:
applied Max Andersen's patch for <meta>attributes in hbm2java
Index: Edge.hbm.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/eg/Edge.hbm.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Edge.hbm.xml 9 Jan 2003 12:24:50 -0000 1.2
--- Edge.hbm.xml 16 Jan 2003 20:52:38 -0000 1.3
***************
*** 2,6 ****
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
! "http://hibernate.sourceforge.net/hibernate-mapping-1.1.dtd">
<hibernate-mapping>
--- 2,6 ----
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
! "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
Index: Vertex.hbm.xml
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/eg/Vertex.hbm.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Vertex.hbm.xml 9 Jan 2003 12:24:50 -0000 1.2
--- Vertex.hbm.xml 16 Jan 2003 20:52:38 -0000 1.3
***************
*** 2,6 ****
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
! "http://hibernate.sourceforge.net/hibernate-mapping-1.1.dtd">
<hibernate-mapping>
--- 2,6 ----
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
! "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
***************
*** 18,27 ****
<property name="name" unique="true" not-null="true" length="50"/>
! <set role="incoming" lazy="true" readonly="true" cascade="all" order-by="name">
<key column="sink"/>
<one-to-many class="net.sf.hibernate.eg.Edge"/>
</set>
! <set role="outgoing" lazy="true" readonly="true" cascade="all" order-by="name desc">
<key column="source"/>
<one-to-many class="net.sf.hibernate.eg.Edge"/>
--- 18,27 ----
<property name="name" unique="true" not-null="true" length="50"/>
! <set name="incoming" lazy="true" inverse="true" cascade="all" order-by="name">
<key column="sink"/>
<one-to-many class="net.sf.hibernate.eg.Edge"/>
</set>
! <set name="outgoing" lazy="true" inverse="true" cascade="all" order-by="name desc">
<key column="source"/>
<one-to-many class="net.sf.hibernate.eg.Edge"/>
|