From: <one...@us...> - 2003-04-06 02:29:30
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/cfg In directory sc8-pr-cvs1:/tmp/cvs-serv13138/cfg Modified Files: Binder.java Log Message: added CompositeUserType refactored handling of component path expressions PersistentIdentifierGenerators now aware of schema Index: Binder.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/cfg/Binder.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Binder.java 5 Apr 2003 07:13:37 -0000 1.12 --- Binder.java 6 Apr 2003 02:28:56 -0000 1.13 *************** *** 10,13 **** --- 10,14 ---- import net.sf.hibernate.MappingException; import net.sf.hibernate.engine.Cascades; + import net.sf.hibernate.id.PersistentIdentifierGenerator; import net.sf.hibernate.loader.OuterJoinLoader; import net.sf.hibernate.mapping.Any; *************** *** 212,216 **** "illegal use of an array as an identifier (arrays don't reimplement equals)" ); ! makeIdentifier(subnode, id); } else if ( "composite-id".equals(name) ) { --- 213,217 ---- "illegal use of an array as an identifier (arrays don't reimplement equals)" ); ! makeIdentifier(subnode, id, mappings); } else if ( "composite-id".equals(name) ) { *************** *** 229,233 **** model.setIdentifierProperty(prop); } ! makeIdentifier(subnode, id); } else if ( "version".equals(name) || "timestamp".equals(name) ) { --- 230,234 ---- model.setIdentifierProperty(prop); } ! makeIdentifier(subnode, id, mappings); } else if ( "version".equals(name) || "timestamp".equals(name) ) { *************** *** 712,716 **** } ! private static void makeIdentifier(Element node, Value model) throws MappingException { //GENERATOR --- 713,717 ---- } ! private static void makeIdentifier(Element node, Value model, Mappings mappings) throws MappingException { //GENERATOR *************** *** 720,723 **** --- 721,729 ---- Properties params = new Properties(); + + if ( mappings.getSchemaName()!=null ) { + params.setProperty( PersistentIdentifierGenerator.SCHEMA, mappings.getSchemaName() ); + } + Iterator iter = subnode.elementIterator("param"); while( iter.hasNext() ) { *************** *** 727,732 **** childNode.getText() ); ! } ! model.setIdentifierGeneratorProperties(params); } --- 733,738 ---- childNode.getText() ); ! } ! model.setIdentifierGeneratorProperties(params); } |