You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(22) |
Nov
(308) |
Dec
(131) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(369) |
Feb
(171) |
Mar
(236) |
Apr
(187) |
May
(218) |
Jun
(217) |
Jul
(127) |
Aug
(448) |
Sep
(270) |
Oct
(231) |
Nov
(422) |
Dec
(255) |
2004 |
Jan
(111) |
Feb
(73) |
Mar
(338) |
Apr
(351) |
May
(349) |
Jun
(495) |
Jul
(394) |
Aug
(1048) |
Sep
(499) |
Oct
(142) |
Nov
(269) |
Dec
(638) |
2005 |
Jan
(825) |
Feb
(1272) |
Mar
(593) |
Apr
(690) |
May
(950) |
Jun
(958) |
Jul
(767) |
Aug
(839) |
Sep
(525) |
Oct
(449) |
Nov
(585) |
Dec
(455) |
2006 |
Jan
(603) |
Feb
(656) |
Mar
(195) |
Apr
(114) |
May
(136) |
Jun
(100) |
Jul
(128) |
Aug
(68) |
Sep
(7) |
Oct
(1) |
Nov
(1) |
Dec
(8) |
2007 |
Jan
(4) |
Feb
(3) |
Mar
(8) |
Apr
(16) |
May
(5) |
Jun
(4) |
Jul
(6) |
Aug
(23) |
Sep
(15) |
Oct
(5) |
Nov
(7) |
Dec
(5) |
2008 |
Jan
(5) |
Feb
(1) |
Mar
(1) |
Apr
(5) |
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(2) |
2013 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <one...@us...> - 2002-11-19 15:28:38
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate In directory sc8-pr-cvs1:/tmp/cvs-serv373/hibernate Modified Files: Environment.java hibernate-mapping.dtd Log Message: allow not between, not in in query language allow subqueries beginning with a from clause in query language Index: Environment.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/Environment.java,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** Environment.java 11 Nov 2002 16:04:54 -0000 1.74 --- Environment.java 19 Nov 2002 15:28:04 -0000 1.75 *************** *** 39,43 **** public final class Environment { ! private static final String VERSION = "1.2 beta 1"; /** --- 39,43 ---- public final class Environment { ! private static final String VERSION = "1.2 beta 3"; /** Index: hibernate-mapping.dtd =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/hibernate-mapping.dtd,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** hibernate-mapping.dtd 19 Nov 2002 10:42:17 -0000 1.81 --- hibernate-mapping.dtd 19 Nov 2002 15:28:05 -0000 1.82 *************** *** 44,48 **** <!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 --> --- 44,48 ---- <!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 --> |
From: <one...@us...> - 2002-11-19 15:28:12
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/test In directory sc8-pr-cvs1:/tmp/cvs-serv373/hibernate/test Modified Files: FooBarTest.java Simple.hbm.xml Log Message: allow not between, not in in query language allow subqueries beginning with a from clause in query language Index: FooBarTest.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/FooBarTest.java,v retrieving revision 1.221 retrieving revision 1.222 diff -C2 -d -r1.221 -r1.222 *** FooBarTest.java 14 Nov 2002 12:42:19 -0000 1.221 --- FooBarTest.java 19 Nov 2002 15:28:07 -0000 1.222 *************** *** 733,736 **** --- 733,737 ---- list = s.find("from foo in class cirrus.hibernate.test.Foo where exists foo.component.importantDates.elements"); assertTrue( list.size()==2, "component query" ); + s.find("from foo in class Foo where not exists (from bar in class Bar where bar.id = foo.id)"); } list = s.find("from foo in class cirrus.hibernate.test.Foo where foo.component.count is null order by foo.component.count"); *************** *** 826,830 **** s.iterate("select baz.code, min(baz.count) from baz in class Baz group by baz.code"); ! FooProxy other = foo.getFoo(); s.delete(bar); --- 827,835 ---- s.iterate("select baz.code, min(baz.count) from baz in class Baz group by baz.code"); ! ! s.iterate("Select baz from baz in class Baz where baz.stringDateMap['foo'] is not null or baz.stringDateMap['bar'] = ?", new Date(), Hibernate.DATE); ! ! s.find("from foo in class Foo where foo.integer not between 1 and 5 and foo.string not in ('cde', 'abc') and foo.string is not null and foo.integer<=3"); ! FooProxy other = foo.getFoo(); s.delete(bar); *************** *** 2468,2472 **** i = s.iterate( "select foo from foo in class cirrus.hibernate.test.Foo where foo in " ! + "(select foo from baz in class cirrus.hibernate.test.Baz, foo in baz.fooArray.elements)" ); assertTrue( i.hasNext() ); --- 2473,2477 ---- i = s.iterate( "select foo from foo in class cirrus.hibernate.test.Foo where foo in " ! + "(select elt from baz in class cirrus.hibernate.test.Baz, elt in baz.fooArray.elements)" ); assertTrue( i.hasNext() ); Index: Simple.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/test/Simple.hbm.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Simple.hbm.xml 11 Oct 2002 05:38:30 -0000 1.6 --- Simple.hbm.xml 19 Nov 2002 15:28:08 -0000 1.7 *************** *** 1,8 **** <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping.dtd" > <hibernate-mapping> <class name="cirrus.hibernate.test.Simple"> ! <id type="long" column="id_" > <generator class="assigned"/> </id> --- 1,8 ---- <?xml version="1.0"?> ! <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping.dtd"> <hibernate-mapping> <class name="cirrus.hibernate.test.Simple"> ! <id type="long" column="id_"> <generator class="assigned"/> </id> |
From: <one...@us...> - 2002-11-19 15:28:12
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/query In directory sc8-pr-cvs1:/tmp/cvs-serv373/hibernate/query Modified Files: ClauseParser.java FromParser.java GroupByParser.java OrderByParser.java ParserHelper.java QueryTranslator.java SelectParser.java WhereParser.java Added Files: PreprocessingParser.java Log Message: allow not between, not in in query language allow subqueries beginning with a from clause in query language --- NEW FILE: PreprocessingParser.java --- //$Id: PreprocessingParser.java,v 1.1 2002/11/19 15:28:07 oneovthafew Exp $ package cirrus.hibernate.query; import java.util.HashSet; import java.util.Map; import java.util.Set; import cirrus.hibernate.QueryException; /** * */ public class PreprocessingParser implements Parser { private static final Set operators; static { operators = new HashSet(); operators.add("<="); operators.add(">="); operators.add("=>"); operators.add("=<"); operators.add("!="); operators.add("<>"); operators.add("!#"); operators.add("!<"); operators.add("!>"); operators.add("is not"); operators.add("not like"); operators.add("not in"); operators.add("not between"); operators.add("not exists"); } private Map replacements; private boolean quoted; private StringBuffer quotedString; private ClauseParser parser = new ClauseParser(); private String lastToken; public PreprocessingParser(Map replacements) { this.replacements=replacements; } /** * @see cirrus.hibernate.query.Parser#token(String, QueryTranslator) */ public void token(String token, QueryTranslator q) throws QueryException { //handle quoted strings if (quoted) { quotedString.append(token); } if ( "'".equals(token) ) { if (quoted) { token = quotedString.toString(); } else { quotedString = new StringBuffer(20).append(token); } quoted = !quoted; } if (quoted) return; //ignore whitespace if ( ParserHelper.isWhitespace(token) ) return; //do replacements String substoken = (String) replacements.get(token); token = (substoken==null) ? token : substoken; //handle <=, >=, !=, is not, not between, not in if (lastToken==null) { lastToken=token; } else { String doubleToken = (token.length()>1) ? lastToken + ' ' + token : lastToken + token; if ( operators.contains(doubleToken) ) { parser.token(doubleToken, q); lastToken=null; } else { parser.token(lastToken, q); lastToken=token; } } } /** * @see cirrus.hibernate.query.Parser#start(QueryTranslator) */ public void start(QueryTranslator q) throws QueryException { quoted = false; parser.start(q); } /** * @see cirrus.hibernate.query.Parser#end(QueryTranslator) */ public void end(QueryTranslator q) throws QueryException { if (lastToken!=null) parser.token(lastToken, q); parser.end(q); } } Index: ClauseParser.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/query/ClauseParser.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** ClauseParser.java 25 Oct 2002 13:03:13 -0000 1.15 --- ClauseParser.java 19 Nov 2002 15:28:06 -0000 1.16 *************** *** 16,20 **** private List selectTokens; private boolean cacheSelectTokens = false; - private boolean quoted=false; private boolean byExpected = false; private boolean enableSubselect = false; --- 16,19 ---- *************** *** 23,87 **** String lcToken = token.toLowerCase(); ! if ( ! byExpected && ! !lcToken.equals("by") && ! !ParserHelper.isWhitespace(lcToken) ! ) throw new QueryException("BY expected after GROUP or ORDER: " + token); ! if ( lcToken.equals("'") ) { ! quoted=!quoted; } ! if (quoted) { ! child.token(token, q); } else { ! if ( !enableSubselect && lcToken.equals("select") ) { ! selectTokens = new ArrayList(); ! cacheSelectTokens = true; ! } ! else if ( !enableSubselect && lcToken.equals("from") ) { ! child = new FromParser(); ! child.start(q); ! cacheSelectTokens = false; ! } ! else if ( !enableSubselect && lcToken.equals("where") ) { ! enableSubselect = true; ! endChild(q); ! child = new WhereParser(); ! child.start(q); ! } ! else if ( lcToken.equals("order") ) { ! endChild(q); ! child = new OrderByParser(); ! byExpected = true; ! } ! else if ( lcToken.equals("having") ) { ! endChild(q); ! enableSubselect = true; ! child = new HavingParser(); ! child.start(q); ! } ! else if ( lcToken.equals("group") ) { ! endChild(q); ! child = new GroupByParser(); ! byExpected = true; ! } ! else if ( lcToken.equals("by") ) { ! if ( !byExpected ) throw new QueryException("GROUP or ORDER expected before BY"); ! child.start(q); ! byExpected = false; } else { ! if (cacheSelectTokens) { ! selectTokens.add(token); } else { ! if (child==null) { ! if ( !ParserHelper.isWhitespace(token) ) ! throw new QueryException("query must begin with SELECT or FROM: " + token); ! } ! else { ! child.token(token, q); ! } } } --- 22,75 ---- String lcToken = token.toLowerCase(); ! if ( byExpected && !lcToken.equals("by") ) ! throw new QueryException("BY expected after GROUP or ORDER: " + token); ! ! if ( !enableSubselect && lcToken.equals("select") ) { ! selectTokens = new ArrayList(); ! cacheSelectTokens = true; } ! else if ( !enableSubselect && lcToken.equals("from") ) { ! child = new FromParser(); ! child.start(q); ! cacheSelectTokens = false; ! } ! else if ( !enableSubselect && lcToken.equals("where") ) { ! enableSubselect = true; ! endChild(q); ! child = new WhereParser(); ! child.start(q); ! } ! else if ( lcToken.equals("order") ) { ! endChild(q); ! child = new OrderByParser(); ! byExpected = true; ! } ! else if ( lcToken.equals("having") ) { ! endChild(q); ! enableSubselect = true; ! child = new HavingParser(); ! child.start(q); ! } ! else if ( lcToken.equals("group") ) { ! endChild(q); ! child = new GroupByParser(); ! byExpected = true; ! } ! else if ( lcToken.equals("by") ) { ! if ( !byExpected ) throw new QueryException("GROUP or ORDER expected before BY"); ! child.start(q); ! byExpected = false; } else { ! if (cacheSelectTokens) { ! selectTokens.add(token); } else { ! if (child==null) { ! throw new QueryException("query must begin with SELECT or FROM: " + token); } else { ! child.token(token, q); } } *************** *** 113,117 **** child.end(q); } - quoted=false; byExpected=false; enableSubselect = false; --- 101,104 ---- Index: FromParser.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/query/FromParser.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** FromParser.java 1 Aug 2002 13:13:36 -0000 1.9 --- FromParser.java 19 Nov 2002 15:28:06 -0000 1.10 *************** *** 18,22 **** public void token(String token, QueryTranslator q) throws QueryException { ! if ( ParserHelper.isWhitespace(token) ) return; //ignore whitespace String lcToken = token.toLowerCase(); if ( lcToken.equals("class") ) { --- 18,22 ---- public void token(String token, QueryTranslator q) throws QueryException { ! String lcToken = token.toLowerCase(); if ( lcToken.equals("class") ) { Index: GroupByParser.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/query/GroupByParser.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** GroupByParser.java 1 Aug 2002 13:13:36 -0000 1.6 --- GroupByParser.java 19 Nov 2002 15:28:07 -0000 1.7 *************** *** 23,27 **** public void token(String token, QueryTranslator q) throws QueryException { ! if ( ParserHelper.isWhitespace(token) ) return; //ignore whitespace if ( q.isName( StringHelper.root(token) ) ) { ParserHelper.parse(pathExpressionParser, token, ParserHelper.PATH_SEPERATORS, q); --- 23,27 ---- public void token(String token, QueryTranslator q) throws QueryException { ! if ( q.isName( StringHelper.root(token) ) ) { ParserHelper.parse(pathExpressionParser, token, ParserHelper.PATH_SEPERATORS, q); Index: OrderByParser.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/query/OrderByParser.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** OrderByParser.java 1 Aug 2002 13:13:36 -0000 1.11 --- OrderByParser.java 19 Nov 2002 15:28:07 -0000 1.12 *************** *** 22,26 **** public void token(String token, QueryTranslator q) throws QueryException { ! if ( ParserHelper.isWhitespace(token) ) return; //ignore whitespace if ( q.isName( StringHelper.root(token) ) ) { ParserHelper.parse(pathExpressionParser, token, ParserHelper.PATH_SEPERATORS, q); --- 22,26 ---- public void token(String token, QueryTranslator q) throws QueryException { ! if ( q.isName( StringHelper.root(token) ) ) { ParserHelper.parse(pathExpressionParser, token, ParserHelper.PATH_SEPERATORS, q); Index: ParserHelper.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/query/ParserHelper.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ParserHelper.java 17 Sep 2002 13:53:12 -0000 1.9 --- ParserHelper.java 19 Nov 2002 15:28:07 -0000 1.10 *************** *** 2,6 **** package cirrus.hibernate.query; - import java.util.Map; import java.util.StringTokenizer; --- 2,5 ---- *************** *** 30,54 **** while ( tokens.hasMoreElements() ) p.token( tokens.nextToken(), q ); p.end(q); - } - - - public static void parse(Parser p, String text, String seperators, QueryTranslator q, Map replacements) throws QueryException { - - if ( replacements.size() == 0 ) { - parse(p, text, seperators, q); - } - else { - boolean quoted = false; - StringTokenizer tokens = new StringTokenizer(text, seperators, true); - p.start(q); - while ( tokens.hasMoreElements() ) { - String token = tokens.nextToken(); - if ( token.equals("'") ) quoted = !quoted; - String substoken = (String) replacements.get(token); - p.token( (quoted || substoken==null) ? token : substoken, q ); - } - p.end(q); - } - } --- 29,32 ---- Index: QueryTranslator.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/query/QueryTranslator.java,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** QueryTranslator.java 14 Nov 2002 11:28:55 -0000 1.43 --- QueryTranslator.java 19 Nov 2002 15:28:07 -0000 1.44 *************** *** 45,49 **** private static final HashSet dontSpace = new HashSet(); static { ! dontSpace.add("'"); dontSpace.add("."); dontSpace.add("<"); --- 45,49 ---- private static final HashSet dontSpace = new HashSet(); static { ! //dontSpace.add("'"); dontSpace.add("."); dontSpace.add("<"); *************** *** 133,137 **** log.trace("compiling query"); try { ! ParserHelper.parse( new ClauseParser(), queryString, ParserHelper.HQL_SEPERATORS, this, replacements ); sql = renderSQL(); } --- 133,137 ---- log.trace("compiling query"); try { ! ParserHelper.parse( new PreprocessingParser(replacements), queryString, ParserHelper.HQL_SEPERATORS, this ); sql = renderSQL(); } *************** *** 600,608 **** private void appendTokens(StringBuffer buf, Iterator iter) { boolean lastSpaceable=true; - boolean quoted=false; while ( iter.hasNext() ) { String token = (String) iter.next(); ! if ( token.equals("'") ) quoted=!quoted; ! boolean spaceable = !quoted && !dontSpace.contains(token); if (spaceable && lastSpaceable) buf.append(' '); lastSpaceable = spaceable; --- 600,606 ---- private void appendTokens(StringBuffer buf, Iterator iter) { boolean lastSpaceable=true; while ( iter.hasNext() ) { String token = (String) iter.next(); ! boolean spaceable = !dontSpace.contains(token); if (spaceable && lastSpaceable) buf.append(' '); lastSpaceable = spaceable; Index: SelectParser.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/query/SelectParser.java,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** SelectParser.java 26 Oct 2002 16:23:02 -0000 1.33 --- SelectParser.java 19 Nov 2002 15:28:07 -0000 1.34 *************** *** 35,39 **** public void token(String token, QueryTranslator q) throws QueryException { - if ( ParserHelper.isWhitespace(token) ) return; //ignore whitespace String lctoken = token.toLowerCase(); --- 35,38 ---- Index: WhereParser.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/query/WhereParser.java,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** WhereParser.java 14 Nov 2002 11:28:55 -0000 1.37 --- WhereParser.java 19 Nov 2002 15:28:07 -0000 1.38 *************** *** 39,54 **** private static final Set expressionOpeners = new HashSet(); //tokens that open a sub expression private static final Set booleanOperators = new HashSet(); //tokens that would indicate a sub expression is a boolean expression - private static final Set functions = new HashSet(); static { expressionTerminators.add("and"); expressionTerminators.add("or"); - //expressionTerminators.add(","); //TODO: is this needed???? expressionTerminators.add(")"); expressionOpeners.add("and"); expressionOpeners.add("or"); - //expressionOpeners.add(","); //TODO: is this needed???? expressionOpeners.add("("); booleanOperators.add("<"); --- 39,53 ---- private static final Set expressionOpeners = new HashSet(); //tokens that open a sub expression private static final Set booleanOperators = new HashSet(); //tokens that would indicate a sub expression is a boolean expression static { expressionTerminators.add("and"); expressionTerminators.add("or"); expressionTerminators.add(")"); + //expressionTerminators.add(","); // deliberately excluded expressionOpeners.add("and"); expressionOpeners.add("or"); expressionOpeners.add("("); + //expressionOpeners.add(","); // deliberately excluded booleanOperators.add("<"); *************** *** 64,73 **** booleanOperators.add("exists"); booleanOperators.add("between"); - functions.add("in"); - functions.add("exists"); - functions.add("any"); - functions.add("some"); - functions.add("all"); } // Handles things like: --- 63,81 ---- booleanOperators.add("exists"); booleanOperators.add("between"); + booleanOperators.add("<="); + booleanOperators.add(">="); + booleanOperators.add("=>"); + booleanOperators.add("=<"); + booleanOperators.add("!="); + booleanOperators.add("<>"); + booleanOperators.add("!#"); + booleanOperators.add("!<"); + booleanOperators.add("!>"); + booleanOperators.add("is not"); + booleanOperators.add("not like"); + booleanOperators.add("not in"); + booleanOperators.add("not between"); + booleanOperators.add("not exists"); } // Handles things like: *************** *** 92,97 **** private boolean quoted = false; //Inside a quoted string private boolean betweenSpecialCase = false; //Inside a BETWEEN ... AND ... expression - private boolean isSpecialCase = false; //Inside an IS NULL or IS NOT NULL expression - //private boolean functionSpecialCase = false; //Inside an IN (...,...) expression TODO: is this special case needed now????? private int bracketsSinceFunction = 0; //How deep inside in IN are we? --- 100,103 ---- *************** *** 112,127 **** String lcToken = token.toLowerCase(); - //Cope with quoted strings - - if ( token.equals("'") ) { - quoted=!quoted; - appendToken(q, token); - return; - } - else if (quoted) { - appendToken(q, token); - return; - } - //Cope with [,] --- 118,121 ---- *************** *** 185,189 **** //Cope with a subselect ! if ( lcToken.equals("select") ) { inSubselect=true; subselect = new StringBuffer(20); --- 179,183 ---- //Cope with a subselect ! if ( !inSubselect && ( lcToken.equals("select") || lcToken.equals("from") ) ) { inSubselect=true; subselect = new StringBuffer(20); *************** *** 207,220 **** if (inSubselect) { if ( token.equals("(") ) bracketsSinceSelect++; ! subselect.append(token); return; } - //Cope with whitespace - - if ( ParserHelper.isWhitespace(token) ) { - return; //ignore whitespace - } - //Cope with special cases of AND, NOT, () --- 201,208 ---- if (inSubselect) { if ( token.equals("(") ) bracketsSinceSelect++; ! subselect.append(token).append(' '); return; } //Cope with special cases of AND, NOT, () *************** *** 223,227 **** //Close extra brackets we opened ! if ( /*!functionSpecialCase &&*/ !betweenSpecialCase && expressionTerminators.contains(lcToken) ) { closeExpression(q, lcToken); } --- 211,215 ---- //Close extra brackets we opened ! if ( !betweenSpecialCase && expressionTerminators.contains(lcToken) ) { closeExpression(q, lcToken); } *************** *** 240,247 **** //Open any extra brackets we might need. ! if ( /*!functionSpecialCase &&*/ !betweenSpecialCase && expressionOpeners.contains(lcToken) ) { openExpression(q, lcToken); } ! else if ( !isSpecialCase && lcToken.equals("not") ) { startNot(q); } --- 228,235 ---- //Open any extra brackets we might need. ! if ( !betweenSpecialCase && expressionOpeners.contains(lcToken) ) { openExpression(q, lcToken); } ! else if ( lcToken.equals("not") ) { startNot(q); } *************** *** 322,326 **** q.addIdentifierSpace( pathExpressionParser.getCollectionTable() ); closeExpression(q, ""); - //if (functionSpecialCase && bracketsSinceFunction==0) functionSpecialCase=false; } else { --- 310,313 ---- *************** *** 376,405 **** private void specialCasesBefore(String lcToken) { ! if ( lcToken.equals("between") ) { betweenSpecialCase = true; } - else if ( lcToken.equals("is") ) { - isSpecialCase = true; - } - /*else if ( functions.contains(lcToken) ) { - functionSpecialCase = true; - } - else if ( functionSpecialCase && lcToken.equals("(") ) { - bracketsSinceFunction++; - }*/ } private void specialCasesAfter(String lcToken) { ! if ( lcToken.equals("and") ) { betweenSpecialCase = false; } - else if ( lcToken.equals("null") ) { - isSpecialCase = false; - } - /*else if ( functionSpecialCase && lcToken.equals(")") ) { - if ( --bracketsSinceFunction == 0 ) { - functionSpecialCase = false; - } - }*/ } --- 363,375 ---- private void specialCasesBefore(String lcToken) { ! if ( lcToken.equals("between") || lcToken.equals("not between") ) { betweenSpecialCase = true; } } private void specialCasesAfter(String lcToken) { ! if ( betweenSpecialCase && lcToken.equals("and") ) { betweenSpecialCase = false; } } |
From: <cel...@us...> - 2002-11-19 15:14:20
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools/reverse In directory sc8-pr-cvs1:/tmp/cvs-serv28587/Hibernate/cirrus/hibernate/tools/reverse Modified Files: JDBCUtil.java MapGui.java Log Message: fixed compile for jdk version < 1.4 Index: JDBCUtil.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools/reverse/JDBCUtil.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** JDBCUtil.java 16 Nov 2002 13:31:24 -0000 1.3 --- JDBCUtil.java 19 Nov 2002 15:14:16 -0000 1.4 *************** *** 212,218 **** rv = Hibernate.TIME; } ! else if (sqlType == Types.BOOLEAN) { rv = Hibernate.BOOLEAN; ! } else if (sqlType == Types.SMALLINT) { rv = Hibernate.SHORT; --- 212,219 ---- rv = Hibernate.TIME; } ! // commented to support JDK version < 1.4 ! /* else if (sqlType == Types.BOOLEAN) { rv = Hibernate.BOOLEAN; ! } */ else if (sqlType == Types.SMALLINT) { rv = Hibernate.SHORT; *************** *** 277,283 **** rv = java.util.Date.class; } ! else if (sqlType == Types.BOOLEAN) { rv = Boolean.class; ! } else if (sqlType == Types.SMALLINT) { rv = Short.class; --- 278,285 ---- rv = java.util.Date.class; } ! // commented to support JDK version < 1.4 ! /* else if (sqlType == Types.BOOLEAN) { rv = Boolean.class; ! } */ else if (sqlType == Types.SMALLINT) { rv = Short.class; Index: MapGui.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools/reverse/MapGui.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MapGui.java 13 Nov 2002 18:06:51 -0000 1.1 --- MapGui.java 19 Nov 2002 15:14:16 -0000 1.2 *************** *** 259,263 **** selectedTables.setFont(new java.awt.Font("Dialog", 0, 12)); - selectedTables.setLayoutOrientation(JList.VERTICAL_WRAP); selectedTables.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent evt) { --- 259,262 ---- |
From: <one...@us...> - 2002-11-19 10:42:21
|
Update of /cvsroot/hibernate/Hibernate/doc/reference/src In directory sc8-pr-cvs1:/tmp/cvs-serv22505/doc/reference/src Modified Files: basic_or_mapping.xml Log Message: added polymorphism attribute to <class> element Index: basic_or_mapping.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate/doc/reference/src/basic_or_mapping.xml,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** basic_or_mapping.xml 16 Nov 2002 13:40:31 -0000 1.34 --- basic_or_mapping.xml 19 Nov 2002 10:42:18 -0000 1.35 *************** *** 94,97 **** --- 94,98 ---- schema="owner" proxy="ProxyInterface" + polymorphism="implicit|explicit" persister="PersisterClass" />]]></programlisting> *************** *** 133,141 **** <para> <literal>proxy</literal> (optional): Specifies an interface to use for lazy ! initializing proxies (JDK 1.3+ only). If the class has no subclasses, you ! may specify the name of the class itself. </para> </listitem> ! <listitem> <para> <literal>persister</literal> (optional): Specifies a custom <literal>ClassPersister</literal>. --- 134,147 ---- <para> <literal>proxy</literal> (optional): Specifies an interface to use for lazy ! initializing proxies. You may specify the name of the class itself. </para> </listitem> ! <listitem> ! <para> ! <literal>polymorphism</literal> (optional, defaults to <literal>implicit</literal>): ! Determines whether implicit or explicit query polymorphism is used. ! </para> ! </listitem> ! <listitem> <para> <literal>persister</literal> (optional): Specifies a custom <literal>ClassPersister</literal>. *************** *** 162,165 **** --- 168,183 ---- </para> + <para><emphasis>Implicit</emphasis> polymorphism means that instances of the class will be returned + by a query that names any superclass or implemented interface or the class and that instances + of any subclass of the class will be returned by a query that names the class itself. + <emphasis>Explicit</emphasis> polymorphism means that class instances will be returned only + be queries that explicitly name that class and that queries that name the class will return + only instances of subclasses mapped inside this <literal><class></literal> declaration + as a <literal><subclass></literal> or <literal><joined-subclass></literal>. For + most purposes the default, <literal>polymorphism="implicit"</literal>, is appropriate. + Explicit polymorphism is useful when two different classes are mapped to the same table + (this allows a "lightweight" class that contains a subset of the table columns). + </para> + <para> The <literal>persister</literal> attribute lets you customize the persistence strategy used for *************** *** 873,878 **** <listitem> <para> ! <literal>proxy</literal> (optional): Specifies an interface to use for lazy ! initializing proxies (JDK 1.3+ only). </para> </listitem> --- 891,896 ---- <listitem> <para> ! <literal>proxy</literal> (optional): Specifies a class or interface to use for ! lazy initializing proxies. </para> </listitem> *************** *** 914,919 **** <listitem> <para> ! <literal>proxy</literal> (optional): Specifies an interface to use for lazy ! initializing proxies (JDK 1.3+ only). </para> </listitem> --- 932,937 ---- <listitem> <para> ! <literal>proxy</literal> (optional): Specifies a class or interface to use ! for lazy initializing proxies. </para> </listitem> |
From: <one...@us...> - 2002-11-19 10:42:21
|
Update of /cvsroot/hibernate/Hibernate/doc/reference/html_single In directory sc8-pr-cvs1:/tmp/cvs-serv22505/doc/reference/html_single Modified Files: index.html Log Message: added polymorphism attribute to <class> element Index: index.html =================================================================== RCS file: /cvsroot/hibernate/Hibernate/doc/reference/html_single/index.html,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** index.html 16 Nov 2002 13:40:30 -0000 1.79 --- index.html 19 Nov 2002 10:42:17 -0000 1.80 *************** *** 598,601 **** --- 598,602 ---- schema="owner" proxy="ProxyInterface" + polymorphism="implicit|explicit" persister="PersisterClass" /></pre><p> The attributes have the following interpretations: *************** *** 616,621 **** </p></li><li><p> <tt>proxy</tt> (optional): Specifies an interface to use for lazy ! initializing proxies (JDK 1.3+ only). If the class has no subclasses, you ! may specify the name of the class itself. </p></li><li><p> <tt>persister</tt> (optional): Specifies a custom <tt>ClassPersister</tt>. --- 617,624 ---- </p></li><li><p> <tt>proxy</tt> (optional): Specifies an interface to use for lazy ! initializing proxies. You may specify the name of the class itself. ! </p></li><li><p> ! <tt>polymorphism</tt> (optional, defaults to <tt>implicit</tt>): ! Determines whether implicit or explicit query polymorphism is used. </p></li><li><p> <tt>persister</tt> (optional): Specifies a custom <tt>ClassPersister</tt>. *************** *** 632,635 **** --- 635,648 ---- the named interface. The actual persistent object will be loaded when a method of the proxy is invoked. See "Proxies for Lazy Initialization" below. + </p><p><span class="emphasis"><em>Implicit</em></span> polymorphism means that instances of the class will be returned + by a query that names any superclass or implemented interface or the class and that instances + of any subclass of the class will be returned by a query that names the class itself. + <span class="emphasis"><em>Explicit</em></span> polymorphism means that class instances will be returned only + be queries that explicitly name that class and that queries that name the class will return + only instances of subclasses mapped inside this <tt><class></tt> declaration + as a <tt><subclass></tt> or <tt><joined-subclass></tt>. For + most purposes the default, <tt>polymorphism="implicit"</tt>, is appropriate. + Explicit polymorphism is useful when two different classes are mapped to the same table + (this allows a "lightweight" class that contains a subset of the table columns). </p><p> The <tt>persister</tt> attribute lets you customize the persistence strategy used for *************** *** 992,997 **** value that distiguishes individual subclasses. </p></li><li><p> ! <tt>proxy</tt> (optional): Specifies an interface to use for lazy ! initializing proxies (JDK 1.3+ only). </p></li></ul></div><p> Each subclass should declare its own persistent properties and subclasses. --- 1005,1010 ---- value that distiguishes individual subclasses. </p></li><li><p> ! <tt>proxy</tt> (optional): Specifies a class or interface to use for ! lazy initializing proxies. </p></li></ul></div><p> Each subclass should declare its own persistent properties and subclasses. *************** *** 1014,1019 **** <tt>name</tt>: The fully qualified class name of the subclass. </p></li><li><p> ! <tt>proxy</tt> (optional): Specifies an interface to use for lazy ! initializing proxies (JDK 1.3+ only). </p></li></ul></div><p> No discriminator column is required for this mapping strategy. Each subclass must, --- 1027,1032 ---- <tt>name</tt>: The fully qualified class name of the subclass. </p></li><li><p> ! <tt>proxy</tt> (optional): Specifies a class or interface to use ! for lazy initializing proxies. </p></li></ul></div><p> No discriminator column is required for this mapping strategy. Each subclass must, |
From: <one...@us...> - 2002-11-19 10:42:20
|
Update of /cvsroot/hibernate/Hibernate/doc/reference/html In directory sc8-pr-cvs1:/tmp/cvs-serv22505/doc/reference/html Modified Files: or-mapping.html Log Message: added polymorphism attribute to <class> element Index: or-mapping.html =================================================================== RCS file: /cvsroot/hibernate/Hibernate/doc/reference/html/or-mapping.html,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** or-mapping.html 16 Nov 2002 13:40:30 -0000 1.32 --- or-mapping.html 19 Nov 2002 10:42:17 -0000 1.33 *************** *** 63,66 **** --- 63,67 ---- schema="owner" proxy="ProxyInterface" + polymorphism="implicit|explicit" persister="PersisterClass" /></pre><p> The attributes have the following interpretations: *************** *** 81,86 **** </p></li><li><p> <tt>proxy</tt> (optional): Specifies an interface to use for lazy ! initializing proxies (JDK 1.3+ only). If the class has no subclasses, you ! may specify the name of the class itself. </p></li><li><p> <tt>persister</tt> (optional): Specifies a custom <tt>ClassPersister</tt>. --- 82,89 ---- </p></li><li><p> <tt>proxy</tt> (optional): Specifies an interface to use for lazy ! initializing proxies. You may specify the name of the class itself. ! </p></li><li><p> ! <tt>polymorphism</tt> (optional, defaults to <tt>implicit</tt>): ! Determines whether implicit or explicit query polymorphism is used. </p></li><li><p> <tt>persister</tt> (optional): Specifies a custom <tt>ClassPersister</tt>. *************** *** 97,100 **** --- 100,113 ---- the named interface. The actual persistent object will be loaded when a method of the proxy is invoked. See "Proxies for Lazy Initialization" below. + </p><p><span class="emphasis"><em>Implicit</em></span> polymorphism means that instances of the class will be returned + by a query that names any superclass or implemented interface or the class and that instances + of any subclass of the class will be returned by a query that names the class itself. + <span class="emphasis"><em>Explicit</em></span> polymorphism means that class instances will be returned only + be queries that explicitly name that class and that queries that name the class will return + only instances of subclasses mapped inside this <tt><class></tt> declaration + as a <tt><subclass></tt> or <tt><joined-subclass></tt>. For + most purposes the default, <tt>polymorphism="implicit"</tt>, is appropriate. + Explicit polymorphism is useful when two different classes are mapped to the same table + (this allows a "lightweight" class that contains a subset of the table columns). </p><p> The <tt>persister</tt> attribute lets you customize the persistence strategy used for *************** *** 457,462 **** value that distiguishes individual subclasses. </p></li><li><p> ! <tt>proxy</tt> (optional): Specifies an interface to use for lazy ! initializing proxies (JDK 1.3+ only). </p></li></ul></div><p> Each subclass should declare its own persistent properties and subclasses. --- 470,475 ---- value that distiguishes individual subclasses. </p></li><li><p> ! <tt>proxy</tt> (optional): Specifies a class or interface to use for ! lazy initializing proxies. </p></li></ul></div><p> Each subclass should declare its own persistent properties and subclasses. *************** *** 479,484 **** <tt>name</tt>: The fully qualified class name of the subclass. </p></li><li><p> ! <tt>proxy</tt> (optional): Specifies an interface to use for lazy ! initializing proxies (JDK 1.3+ only). </p></li></ul></div><p> No discriminator column is required for this mapping strategy. Each subclass must, --- 492,497 ---- <tt>name</tt>: The fully qualified class name of the subclass. </p></li><li><p> ! <tt>proxy</tt> (optional): Specifies a class or interface to use ! for lazy initializing proxies. </p></li></ul></div><p> No discriminator column is required for this mapping strategy. Each subclass must, |
From: <one...@us...> - 2002-11-19 10:42:20
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/map In directory sc8-pr-cvs1:/tmp/cvs-serv22505/cirrus/hibernate/map Modified Files: PersistentClass.java RootClass.java Subclass.java Log Message: added polymorphism attribute to <class> element Index: PersistentClass.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/map/PersistentClass.java,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** PersistentClass.java 6 Nov 2002 00:58:02 -0000 1.40 --- PersistentClass.java 19 Nov 2002 10:42:17 -0000 1.41 *************** *** 166,169 **** --- 166,170 ---- public abstract CacheConcurrencyStrategy getCache(); public abstract PersistentClass getSuperclass(); + public abstract boolean isExplicitPolymorphism(); public abstract Iterator getPropertyClosureIterator(); Index: RootClass.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/map/RootClass.java,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** RootClass.java 6 Nov 2002 00:58:02 -0000 1.50 --- RootClass.java 19 Nov 2002 10:42:17 -0000 1.51 *************** *** 32,35 **** --- 32,36 ---- private final boolean mutable; private boolean embeddedIdentifier = false; // may be final + private final boolean explicitPolymorphism; private Class persister; *************** *** 80,83 **** --- 81,88 ---- setPolymorphic(true); } + + public boolean isExplicitPolymorphism() { + return explicitPolymorphism; + } public RootClass(Node node, Root root) throws MappingException { *************** *** 127,130 **** --- 132,139 ---- Node mutableNode = atts.getNamedItem("mutable"); mutable = (mutableNode==null) || mutableNode.getNodeValue().toLowerCase().equals("true"); + + //POLYMORPHISM + Node polyNode = atts.getNamedItem("polymorphism"); + explicitPolymorphism = (polyNode!=null) && polyNode.getNodeValue().toLowerCase().equals("explicit"); NodeList list = node.getChildNodes(); Index: Subclass.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/map/Subclass.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Subclass.java 5 Nov 2002 13:40:53 -0000 1.19 --- Subclass.java 19 Nov 2002 10:42:17 -0000 1.20 *************** *** 174,176 **** --- 174,180 ---- } + public boolean isExplicitPolymorphism() { + return getSuperclass().isExplicitPolymorphism(); + } + } |
From: <one...@us...> - 2002-11-19 10:42:20
|
Update of /cvsroot/hibernate/Hibernate In directory sc8-pr-cvs1:/tmp/cvs-serv22505 Modified Files: changelog.txt Log Message: added polymorphism attribute to <class> element Index: changelog.txt =================================================================== RCS file: /cvsroot/hibernate/Hibernate/changelog.txt,v retrieving revision 1.265 retrieving revision 1.266 diff -C2 -d -r1.265 -r1.266 *** changelog.txt 14 Nov 2002 12:57:36 -0000 1.265 --- changelog.txt 19 Nov 2002 10:42:17 -0000 1.266 *************** *** 1,4 **** --- 1,10 ---- Hibernate Changelog =================== + Changes in version 1.2 beta 3 (xx.11.2002) + ------------------------------------------ + * fixed bug in UPDATE SQL generation for normalized mapping strategy (fix by Robson Miranda) + * support <composite-id> correctly in CodeGenerator (patch by Tom Cellucci) + * fixed an exception that occurred with short qualified tablenames + * added the polymorphism attribute to the <class> element Changes in version 1.2 beta 2 (15.11.2002) |
From: <one...@us...> - 2002-11-19 10:42:20
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/impl In directory sc8-pr-cvs1:/tmp/cvs-serv22505/cirrus/hibernate/impl Modified Files: SessionFactoryImpl.java Log Message: added polymorphism attribute to <class> element Index: SessionFactoryImpl.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/impl/SessionFactoryImpl.java,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** SessionFactoryImpl.java 6 Nov 2002 00:58:02 -0000 1.58 --- SessionFactoryImpl.java 19 Nov 2002 10:42:17 -0000 1.59 *************** *** 596,605 **** if ( p instanceof Queryable ) { Queryable q = (Queryable) p; ! if ( clazz.equals( q.getMappedClass() ) ) { ! results.add( q.getClassName() ); } ! else if ( clazz.isAssignableFrom( q.getMappedClass() ) ) { ! if ( !q.isInherited() || !clazz.isAssignableFrom( q.getMappedSuperclass() ) ) { ! results.add( q.getClassName() ); } } --- 596,613 ---- if ( p instanceof Queryable ) { Queryable q = (Queryable) p; ! String name = q.getClassName(); ! boolean isMappedClass = clazz.equals( q.getMappedClass() ); ! if ( q.isExplicitPolymorphism() ) { ! if (isMappedClass) return new String[] { name }; } ! else { ! if (isMappedClass) { ! results.add(name); ! } ! else if ( ! clazz.isAssignableFrom( q.getMappedClass() ) && ! ( !q.isInherited() || !clazz.isAssignableFrom( q.getMappedSuperclass() ) ) ! ) { ! results.add(name); } } |
From: <one...@us...> - 2002-11-19 10:42:19
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/persister In directory sc8-pr-cvs1:/tmp/cvs-serv22505/cirrus/hibernate/persister Modified Files: AbstractEntityPersister.java Queryable.java Log Message: added polymorphism attribute to <class> element Index: AbstractEntityPersister.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/persister/AbstractEntityPersister.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** AbstractEntityPersister.java 9 Nov 2002 01:38:06 -0000 1.13 --- AbstractEntityPersister.java 19 Nov 2002 10:42:17 -0000 1.14 *************** *** 56,59 **** --- 56,60 ---- private transient final IdentifierGenerator idgen; private transient final boolean polymorphic; + private transient final boolean explicitPolymorphism; private transient final boolean inherited; private transient final boolean hasSubclasses; *************** *** 411,414 **** --- 412,416 ---- polymorphic = model.isPolymorphic(); + explicitPolymorphism = model.isExplicitPolymorphism(); inherited = model.isInherited(); superclass = inherited ? model.getSuperclass().getPersistentClass() : null; *************** *** 574,577 **** --- 576,583 ---- public Class getMappedSuperclass() { return superclass; + } + + public boolean isExplicitPolymorphism() { + return explicitPolymorphism; } Index: Queryable.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/persister/Queryable.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Queryable.java 6 Nov 2002 00:58:02 -0000 1.8 --- Queryable.java 19 Nov 2002 10:42:17 -0000 1.9 *************** *** 17,20 **** --- 17,24 ---- public boolean isInherited(); /** + * Is this class explicit polymorphism only? + */ + public boolean isExplicitPolymorphism(); + /** * Get the class that this class is mapped as a subclass of - * not necessarily the direct superclass |
From: <one...@us...> - 2002-11-19 10:42:19
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate In directory sc8-pr-cvs1:/tmp/cvs-serv22505/cirrus/hibernate Modified Files: hibernate-mapping-1.1.dtd hibernate-mapping.dtd Log Message: added polymorphism attribute to <class> element Index: hibernate-mapping-1.1.dtd =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/hibernate-mapping-1.1.dtd,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** hibernate-mapping-1.1.dtd 5 Nov 2002 13:40:53 -0000 1.11 --- hibernate-mapping-1.1.dtd 19 Nov 2002 10:42:17 -0000 1.12 *************** *** 35,49 **** (version|timestamp)?, (property|many-to-one|one-to-one|collection|component|map|set|list|bag|array|primitive-array)*, ! ((subclass*)|(joined-subclass*)), ! cache? )> <!ATTLIST class name CDATA #REQUIRED> ! <!ATTLIST class table CDATA #IMPLIED> <!-- default: unqualified classname --> ! <!ATTLIST class schema CDATA #IMPLIED> <!-- default: none --> ! <!ATTLIST class proxy CDATA #IMPLIED> <!-- default: no proxy interface --> <!ATTLIST class mutable (true|false) "true"> ! <!ATTLIST class persister CDATA #IMPLIED> <!-- default: cirrus.hibernate.persister.EntityPersister --> ! ! <!ATTLIST class discriminator-value CDATA #IMPLIED> <!-- default: unqualified class name | none --> <!-- Declares the id type, column and generation algorithm for an entity class. --- 35,48 ---- (version|timestamp)?, (property|many-to-one|one-to-one|collection|component|map|set|list|bag|array|primitive-array)*, ! ((subclass*)|(joined-subclass*)) )> <!ATTLIST class name CDATA #REQUIRED> ! <!ATTLIST class table CDATA #IMPLIED> <!-- default: unqualified classname --> ! <!ATTLIST class schema CDATA #IMPLIED> <!-- default: none --> ! <!ATTLIST class proxy CDATA #IMPLIED> <!-- default: no proxy interface --> <!ATTLIST class mutable (true|false) "true"> ! <!ATTLIST class persister CDATA #IMPLIED> ! <!ATTLIST class polymorphism (implicit|explicit) "implicit"> ! <!ATTLIST class discriminator-value CDATA #IMPLIED> <!-- default: unqualified class name | none --> <!-- Declares the id type, column and generation algorithm for an entity class. Index: hibernate-mapping.dtd =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/hibernate-mapping.dtd,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** hibernate-mapping.dtd 27 Oct 2002 18:30:56 -0000 1.80 --- hibernate-mapping.dtd 19 Nov 2002 10:42:17 -0000 1.81 *************** *** 44,48 **** <!ATTLIST class mutable CDATA #IMPLIED> <!-- default: true --> <!ATTLIST class persister CDATA #IMPLIED> <!-- default: cirrus.hibernate.persister.EntityPersister --> ! <!ATTLIST class discriminator-value CDATA #IMPLIED> <!-- default: unqualified class name | none --> --- 44,48 ---- <!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 --> |
From: <one...@us...> - 2002-11-19 08:14:07
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/loader In directory sc8-pr-cvs1:/tmp/cvs-serv26290/cirrus/hibernate/loader Modified Files: OuterJoinLoader.java Log Message: fix for an exception that occurred with qualified tablenames < 5 characters long Index: OuterJoinLoader.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/loader/OuterJoinLoader.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** OuterJoinLoader.java 5 Nov 2002 03:44:01 -0000 1.12 --- OuterJoinLoader.java 19 Nov 2002 08:14:04 -0000 1.13 *************** *** 273,280 **** protected static String alias(String tableName, int n) { return aliasCore(tableName.length() <=5 ? tableName : ! StringHelper.unqualify(tableName).substring(0, 5), Integer.toString(n) ); --- 273,282 ---- protected static String alias(String tableName, int n) { + + tableName = StringHelper.unqualify(tableName); return aliasCore(tableName.length() <=5 ? tableName : ! tableName.substring(0, 5), Integer.toString(n) ); |
From: <one...@pr...> - 2002-11-18 11:43:33
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/persister In directory sc8-pr-cvs1:/tmp/cvs-serv27704/hibernate/persister Modified Files: MultiTableEntityPersister.java Log Message: fixed problem with class that declares no properties Index: MultiTableEntityPersister.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/persister/MultiTableEntityPersister.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** MultiTableEntityPersister.java 16 Nov 2002 13:26:22 -0000 1.29 --- MultiTableEntityPersister.java 18 Nov 2002 11:43:30 -0000 1.30 *************** *** 25,29 **** import java.sql.SQLException; import java.util.ArrayList; - import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; --- 25,28 ---- *************** *** 82,85 **** --- 81,85 ---- private transient final int[] propertyColumnSpans; private transient final int[] propertyTables; + private transient final boolean[] hasColumns; private transient final String[][] propertyColumnNames; private transient final String[][] propertyColumnNameAliases; *************** *** 97,101 **** private transient final Type[] subclassPropertyTypeClosure; private transient final Class[] subclassClosure; - private transient final boolean hasColumns; private transient final HashMap tableNumberByPropertyPath = new HashMap(); --- 97,100 ---- *************** *** 462,465 **** --- 461,465 ---- String[] result = new String[ tableNames.length ]; for ( int j=0; j<tableNames.length; j++ ) { + boolean hasColumns = false; StringBuffer setters = new StringBuffer(20); for (int i=0; i<propertyColumnNames.length; i++) { *************** *** 467,487 **** for ( int k=0; k<propertyColumnNames[i].length; k++ ) setters.append( propertyColumnNames[i][k] ).append(" = ?, "); } } ! setters.setLength( setters.length()-2 ); //trim last comma ! StringBuffer buf = new StringBuffer(100) ! .append("update ") ! .append( tableNames[j] ) ! .append(" set ") ! .append( setters.toString() ) ! .append(" where ") ! .append( StringHelper.join( " = ? and ", tableKeyColumns[j] ) ) //TODO:refactor out copied code ! .append(" = ?"); ! if ( isVersioned() && j==0 ) { ! buf.append(" and ") ! .append(versionColumnName) ! .append(" = ?"); } - result[j] = buf.toString(); } return result; --- 467,493 ---- for ( int k=0; k<propertyColumnNames[i].length; k++ ) setters.append( propertyColumnNames[i][k] ).append(" = ?, "); + hasColumns = true; } } ! if (!hasColumns) { ! result[j]=null; ! } ! else { ! setters.setLength( setters.length()-2 ); //trim last comma ! StringBuffer buf = new StringBuffer(100) ! .append("update ") ! .append( tableNames[j] ) ! .append(" set ") ! .append( setters.toString() ) ! .append(" where ") ! .append( StringHelper.join( " = ? and ", tableKeyColumns[j] ) ) //TODO:refactor out copied code ! .append(" = ?"); ! if ( isVersioned() && j==0 ) { ! buf.append(" and ") ! .append(versionColumnName) ! .append(" = ?"); ! } ! result[j] = buf.toString(); } } return result; *************** *** 757,769 **** public void update(Serializable id, Object[] fields, int[] dirtyFields, Object oldVersion, Object object, SessionImplementor session) throws SQLException, HibernateException { - if (!hasColumns) return; // for objects that came in via update() - int tables = tableNames.length; ! boolean[] tableUpdateNeeded = new boolean[tables]; if (dirtyFields==null) { ! Arrays.fill(tableUpdateNeeded, true); // for objects that came in via update() } else { for ( int i=0; i<dirtyFields.length; i++ ) { tableUpdateNeeded[ propertyTables[ dirtyFields[i] ] ] = true; --- 763,774 ---- public void update(Serializable id, Object[] fields, int[] dirtyFields, Object oldVersion, Object object, SessionImplementor session) throws SQLException, HibernateException { int tables = tableNames.length; ! boolean[] tableUpdateNeeded; if (dirtyFields==null) { ! tableUpdateNeeded = hasColumns; // for objects that came in via update() } else { + tableUpdateNeeded = new boolean[tables]; for ( int i=0; i<dirtyFields.length; i++ ) { tableUpdateNeeded[ propertyTables[ dirtyFields[i] ] ] = true; *************** *** 1126,1130 **** } ! hasColumns = columnNames.length!=0; } --- 1131,1138 ---- } ! hasColumns = new boolean[updateStrings.length]; ! for ( int m=0; m<updateStrings.length; m++ ) { ! hasColumns[m] = updateStrings[m]!=null; ! } } |
From: <one...@us...> - 2002-11-16 13:40:34
|
Update of /cvsroot/hibernate/Hibernate/doc/reference/src In directory usw-pr-cvs1:/tmp/cvs-serv3905/doc/reference/src Modified Files: basic_or_mapping.xml Log Message: fixed minor doco bug Index: basic_or_mapping.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate/doc/reference/src/basic_or_mapping.xml,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** basic_or_mapping.xml 7 Nov 2002 16:24:11 -0000 1.33 --- basic_or_mapping.xml 16 Nov 2002 13:40:31 -0000 1.34 *************** *** 91,95 **** table="tableName" discriminator-value="discriminator_value" ! mutable="read-write|read-only" schema="owner" proxy="ProxyInterface" --- 91,95 ---- table="tableName" discriminator-value="discriminator_value" ! mutable="true|false" schema="owner" proxy="ProxyInterface" |
From: <one...@us...> - 2002-11-16 13:40:33
|
Update of /cvsroot/hibernate/Hibernate/doc/reference/html_single In directory usw-pr-cvs1:/tmp/cvs-serv3905/doc/reference/html_single Modified Files: index.html Log Message: fixed minor doco bug Index: index.html =================================================================== RCS file: /cvsroot/hibernate/Hibernate/doc/reference/html_single/index.html,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** index.html 14 Nov 2002 15:01:49 -0000 1.78 --- index.html 16 Nov 2002 13:40:30 -0000 1.79 *************** *** 595,599 **** table="tableName" discriminator-value="discriminator_value" ! mutable="read-write|read-only" schema="owner" proxy="ProxyInterface" --- 595,599 ---- table="tableName" discriminator-value="discriminator_value" ! mutable="true|false" schema="owner" proxy="ProxyInterface" |
From: <one...@us...> - 2002-11-16 13:40:33
|
Update of /cvsroot/hibernate/Hibernate/doc/reference/html In directory usw-pr-cvs1:/tmp/cvs-serv3905/doc/reference/html Modified Files: or-mapping.html Log Message: fixed minor doco bug Index: or-mapping.html =================================================================== RCS file: /cvsroot/hibernate/Hibernate/doc/reference/html/or-mapping.html,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** or-mapping.html 7 Nov 2002 16:24:09 -0000 1.31 --- or-mapping.html 16 Nov 2002 13:40:30 -0000 1.32 *************** *** 60,64 **** table="tableName" discriminator-value="discriminator_value" ! mutable="read-write|read-only" schema="owner" proxy="ProxyInterface" --- 60,64 ---- table="tableName" discriminator-value="discriminator_value" ! mutable="true|false" schema="owner" proxy="ProxyInterface" |
From: <one...@us...> - 2002-11-16 13:31:27
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools/reverse In directory usw-pr-cvs1:/tmp/cvs-serv2934/cirrus/hibernate/tools/reverse Modified Files: JDBCUtil.java MapGenerator.java Log Message: use commons logging instead of log4j Index: JDBCUtil.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools/reverse/JDBCUtil.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** JDBCUtil.java 14 Nov 2002 11:28:56 -0000 1.2 --- JDBCUtil.java 16 Nov 2002 13:31:24 -0000 1.3 *************** *** 8,14 **** import java.sql.*; import java.util.*; import cirrus.hibernate.Hibernate; import cirrus.hibernate.type.NullableType; ! import org.apache.log4j.*; /** * --- 8,18 ---- import java.sql.*; import java.util.*; + + import org.apache.commons.logging.Log; + import org.apache.commons.logging.LogFactory; + import cirrus.hibernate.Hibernate; import cirrus.hibernate.type.NullableType; ! /** * *************** *** 16,20 **** */ public class JDBCUtil { ! private static Logger logger = Logger.getLogger(JDBCUtil.class); public static class Column { public String name; --- 20,24 ---- */ public class JDBCUtil { ! private static final Log logger = LogFactory.getLog(JDBCUtil.class); public static class Column { public String name; Index: MapGenerator.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools/reverse/MapGenerator.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MapGenerator.java 14 Nov 2002 14:58:45 -0000 1.3 --- MapGenerator.java 16 Nov 2002 13:31:24 -0000 1.4 *************** *** 11,15 **** import java.util.*; import java.io.*; - import org.apache.log4j.*; import cirrus.hibernate.tools.codegen.*; import javax.xml.transform.*; --- 11,14 ---- *************** *** 17,20 **** --- 16,21 ---- import javax.xml.transform.stream.*; + import org.apache.commons.logging.Log; + import org.apache.commons.logging.LogFactory; /** *************** *** 23,27 **** */ public class MapGenerator { ! private static Logger logger = Logger.getLogger(MapGenerator.class); private String generator; private String[] generatorParameters; --- 24,28 ---- */ public class MapGenerator { ! private static Log logger = LogFactory.getLog(MapGenerator.class); private String generator; private String[] generatorParameters; |
From: <one...@us...> - 2002-11-16 13:26:25
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/persister In directory usw-pr-cvs1:/tmp/cvs-serv1655/cirrus/hibernate/persister Modified Files: MultiTableEntityPersister.java Log Message: Robson Miranda's fix to a bug in SQL generation Index: MultiTableEntityPersister.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/persister/MultiTableEntityPersister.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** MultiTableEntityPersister.java 5 Nov 2002 11:48:08 -0000 1.28 --- MultiTableEntityPersister.java 16 Nov 2002 13:26:22 -0000 1.29 *************** *** 463,467 **** for ( int j=0; j<tableNames.length; j++ ) { StringBuffer setters = new StringBuffer(20); ! for (int i=0; i<columnNames.length; i++) { if ( propertyTables[i]==j ) { for ( int k=0; k<propertyColumnNames[i].length; k++ ) --- 463,467 ---- for ( int j=0; j<tableNames.length; j++ ) { StringBuffer setters = new StringBuffer(20); ! for (int i=0; i<propertyColumnNames.length; i++) { if ( propertyTables[i]==j ) { for ( int k=0; k<propertyColumnNames[i].length; k++ ) |
From: <one...@us...> - 2002-11-16 13:18:41
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools/codegen In directory usw-pr-cvs1:/tmp/cvs-serv32462/cirrus/hibernate/tools/codegen Modified Files: ClassMapping.java Log Message: woops ... previous changes got lost Index: ClassMapping.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools/codegen/ClassMapping.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ClassMapping.java 16 Nov 2002 13:12:22 -0000 1.14 --- ClassMapping.java 16 Nov 2002 13:18:38 -0000 1.15 *************** *** 13,16 **** --- 13,17 ---- import cirrus.hibernate.type.Type; + import org.apache.commons.lang.StringUtils; import org.jdom.Attribute; import org.jdom.Element; *************** *** 121,124 **** --- 122,143 ---- } + // one to ones + List onetooneList = classElement.getChildren("one-to-one"); + for (Iterator onetoones = onetooneList.iterator(); onetoones.hasNext();) { + Element onetoone = (Element) onetoones.next(); + + String name = onetoone.getAttributeValue("name"); + + // ensure that the class is specified + String clazz = onetoone.getAttributeValue("class"); + if(StringUtils.isEmpty(clazz)) { + System.out.println("one-to-one \"" + name + "\" in class " + getName() + " is missing a class attribute"); + continue; + } + + fields.add(new Field(name, getFieldType(clazz), true)); + + } + // many to ones - TODO: consolidate with code above for (Iterator manytoOnes = classElement.getChildren("many-to-one").iterator(); manytoOnes.hasNext();) { *************** *** 129,133 **** // ensure that the type is specified String type = manyToOne.getAttributeValue("class"); ! if ( type == null || type.trim().equals("") ) { System.out.println("many-to-one \"" + name + "\" in class " + getName() + " is missing a class attribute"); continue; --- 148,152 ---- // ensure that the type is specified String type = manyToOne.getAttributeValue("class"); ! if ( StringUtils.isEmpty(type) ) { System.out.println("many-to-one \"" + name + "\" in class " + getName() + " is missing a class attribute"); continue; |
From: <one...@us...> - 2002-11-16 13:12:26
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools/codegen In directory usw-pr-cvs1:/tmp/cvs-serv31226/cirrus/hibernate/tools/codegen Modified Files: ClassMapping.java Log Message: Tom Cellucci's patch allowing correct composite-id generation Index: ClassMapping.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools/codegen/ClassMapping.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ClassMapping.java 10 Nov 2002 15:19:48 -0000 1.13 --- ClassMapping.java 16 Nov 2002 13:12:22 -0000 1.14 *************** *** 13,17 **** import cirrus.hibernate.type.Type; - import org.apache.commons.lang.StringUtils; import org.jdom.Attribute; import org.jdom.Element; --- 13,16 ---- *************** *** 19,175 **** public class ClassMapping { ! private ClassName name = null; ! private String superClass = null; ! private String proxyClass = null; ! private List fields = new ArrayList(); ! private TreeSet imports = new TreeSet(); ! private List subclasses = new ArrayList(); ! private static final Map components = new HashMap(); ! ! ! public ClassMapping(ClassName superClass, Element classElement) throws Exception { ! this(classElement); ! ! this.superClass = superClass.getName(); ! addImport(superClass); ! } ! ! public ClassMapping(Element classElement) throws Exception { ! this(classElement, false); ! } ! ! public ClassMapping(Element classElement, boolean component) throws Exception { ! String fullyQualifiedName = classElement.getAttributeValue(component?"class":"name"); ! ! System.out.println("processing mapping for class: " + fullyQualifiedName); ! ! // class & package names ! name = new ClassName(); ! name.setFullyQualifiedName(fullyQualifiedName); ! ! // get the properties defined for this class ! List propertyList = new ArrayList(); ! ! propertyList.addAll( classElement.getChildren("property") ); ! ! Attribute att = classElement.getAttribute("proxy"); ! if (att!=null) proxyClass = att.getValue(); ! ! Element id = classElement.getChild("id"); ! ! if (id != null) propertyList.add(0, id); ! ! // derive the class imports and fields from the properties ! for (Iterator properties = propertyList.iterator(); properties.hasNext();) { ! Element property = (Element) properties.next(); ! ! String name = property.getAttributeValue("name"); ! if ( name == null || name.trim().equals("") ) { ! continue; //since an id doesn't necessarily need a name ! } ! ! // ensure that the type is specified ! String type = property.getAttributeValue("type"); ! if (StringUtils.isEmpty(type)) { ! System.out.println("property \"" + name + "\" in class " + getName() + " is missing a type attribute"); ! continue; ! } ! ! // handle in a different way id and properties... ! // ids may be generated and may need to be of object type in order to support ! // the unsaved-value "null" value. ! // Properties may be nullable (whilst ids can not) ! if(property == id) { ! Element generator = property.getChild("generator"); ! String unsavedValue = property.getAttributeValue("unsaved-value"); ! boolean needObject = (unsavedValue != null && unsavedValue.equals("null")); ! boolean generated = !generator.getAttributeValue("class").equals("assigned"); ! Field idField = new Field(name, getFieldType(type, needObject), true, generated); ! fields.add(idField); ! } else { ! String notnull = property.getAttributeValue("not-null"); ! // if not-null property is missing lets see if it has been ! // defined at column level ! if(notnull == null) { ! Element column = property.getChild("column"); ! if(column != null) ! notnull = column.getAttributeValue("not-null"); ! } ! boolean nullable = (notnull == null || notnull.equals("false")); ! fields.add(new Field(name, getFieldType(type), nullable)); ! } ! } ! ! List onetooneList = classElement.getChildren("one-to-one"); ! for (Iterator onetoones = onetooneList.iterator(); onetoones.hasNext();) { ! Element onetoone = (Element) onetoones.next(); ! ! String name = onetoone.getAttributeValue("name"); ! ! // ensure that the class is specified ! String clazz = onetoone.getAttributeValue("class"); ! if(StringUtils.isEmpty(clazz)) { ! System.out.println("one-to-one \"" + name + "\" in class " + getName() + " is missing a class attribute"); ! continue; ! } ! ! fields.add(new Field(name, getFieldType(clazz), true)); ! ! } ! ! ! // many to ones - TODO: consolidate with code above ! for (Iterator manytoOnes = classElement.getChildren("many-to-one").iterator(); manytoOnes.hasNext();) { ! Element manyToOne = (Element) manytoOnes.next(); ! ! String name = manyToOne.getAttributeValue("name"); ! ! // ensure that the type is specified ! String type = manyToOne.getAttributeValue("class"); ! if ( type == null || type.trim().equals("") ) { ! System.out.println("many-to-one \"" + name + "\" in class " + getName() + " is missing a class attribute"); ! continue; ! } ! ClassName classType = new ClassName(); ! classType.setFullyQualifiedName(type); ! ! // is it nullable? ! String notnull = manyToOne.getAttributeValue("not-null"); ! boolean nullable = (notnull == null || notnull.equals("false")); ! ! // add an import and field for this property ! addImport(classType); ! Field f = new Field( name, classType.getName(), nullable ); ! f.setClassType(classType); ! fields.add(f); ! } ! ! // collections ! doCollections(classElement, "list", "java.util.List", "java.util.ArrayList"); ! doCollections(classElement, "map", "java.util.Map", "java.util.HashMap"); ! doCollections(classElement, "set", "java.util.Set", "java.util.HashSet"); ! doArrays(classElement, "array"); ! doArrays(classElement, "primitive-array"); ! ! ! // subclasses ! ! for ( Iterator iter = classElement.getChildren("subclass").iterator(); iter.hasNext(); ) { ! Element subclass = (Element) iter.next(); ! ClassMapping subclassMapping = new ClassMapping(name, subclass); ! subclasses.add(subclassMapping); ! } ! ! //components ! ! for ( Iterator iter = classElement.getChildren("component").iterator(); iter.hasNext(); ) { ! Element cmpe = (Element) iter.next(); ! String cmpname = cmpe.getAttributeValue("name"); ! String cmpclass = cmpe.getAttributeValue("class"); ! if ( cmpclass==null || cmpclass.equals("") ) { ! System.out.println("component \"" + cmpname + "\" in class " + getName() + " does not specify a class"); ! continue; ! } ! ClassMapping mapping = new ClassMapping(cmpe, true); ClassName classType = new ClassName(); --- 18,73 ---- public class ClassMapping { ! private ClassName name = null; ! private String superClass = null; ! private String proxyClass = null; ! private List fields = new ArrayList(); ! private TreeSet imports = new TreeSet(); ! private List subclasses = new ArrayList(); ! private static final Map components = new HashMap(); ! ! ! public ClassMapping(ClassName superClass, Element classElement) throws Exception { ! this(classElement); ! ! this.superClass = superClass.getName(); ! addImport(superClass); ! } ! ! public ClassMapping(Element classElement) throws Exception { ! this(classElement, false); ! } ! ! public ClassMapping(Element classElement, boolean component) throws Exception { ! String fullyQualifiedName = classElement.getAttributeValue(component?"class":"name"); ! ! System.out.println("processing mapping for class: " + fullyQualifiedName); ! ! // class & package names ! name = new ClassName(); ! name.setFullyQualifiedName(fullyQualifiedName); ! ! // get the properties defined for this class ! List propertyList = new ArrayList(); ! ! propertyList.addAll( classElement.getChildren("property") ); ! ! Attribute att = classElement.getAttribute("proxy"); ! if (att!=null) proxyClass = att.getValue(); ! ! Element id = classElement.getChild("id"); ! ! if (id != null) propertyList.add(0, id); ! // ! // composite id ! ! Element cmpid = classElement.getChild("composite-id"); ! if (cmpid != null) { ! String cmpname = cmpid.getAttributeValue("name"); ! String cmpclass = cmpid.getAttributeValue("class"); ! if ( cmpclass==null || cmpclass.equals("") ) { ! propertyList.addAll(cmpid.getChildren("key-property")); ! } ! else { ! ClassMapping mapping = new ClassMapping(cmpid, true); ClassName classType = new ClassName(); *************** *** 179,331 **** fields.add(new Field(cmpname, classType.getName(), false)); components.put( mapping.getCanonicalName(), mapping ); ! } ! } ! ! public List getFields() { ! return fields; ! } ! ! public TreeSet getImports() { ! return imports; ! } ! ! public String getCanonicalName() { ! return name.getFullyQualifiedName(); ! } ! ! public String getName() { ! return name.getName(); ! } ! ! public String getProxy() { ! return proxyClass; ! } ! ! public String getPackageName() { ! return name.getPackageName(); ! } ! ! public List getSubclasses() { ! return subclasses; ! } ! ! public String getSuperClass() { ! return superClass; ! } ! ! ! // We need a minimal constructor only if it's different from ! // the full constructor or the no-arg constructor. ! // A minimal construtor is one that lets ! // you specify only the required fields. ! public boolean needsMinimalConstructor() { ! boolean generatedId = true; ! boolean missingId = true; ! int countNull = 0; ! for(Iterator it = fields.iterator(); it.hasNext(); ) { ! Field f = (Field) it.next(); ! if(f.isIdentifier()) { ! generatedId = f.isGenerated(); ! missingId = false; ! } ! else ! if(f.isNullable()) countNull++; ! } ! ! return !(countNull == 0 || ! ((countNull == (fields.size() - 1)) && generatedId) || ! ((countNull == (fields.size()) && missingId))); ! ! } ! ! private void addImport(ClassName className) { ! // if the package is java.lang or our own package don't add ! if ( !className.inJavaLang() && !className.inSamePackage(name) ) { ! imports.add( className.getFullyQualifiedName() ); ! } ! } ! ! public static Iterator getComponents() { ! return components.values().iterator(); ! } ! ! private void doCollections(Element classElement, String xmlName, String interfaceClass, String implementingClass) { ! ! ClassName interfaceClassName = new ClassName(); ! ClassName implementingClassName = new ClassName(); ! ! interfaceClassName.setFullyQualifiedName(interfaceClass); ! implementingClassName.setFullyQualifiedName(implementingClass); ! ! for (Iterator collections = classElement.getChildren(xmlName).iterator(); collections.hasNext();) { ! Element collection = (Element) collections.next(); ! ! String name = collection.getAttributeValue("role"); ! ! // add an import and field for this collection ! addImport(interfaceClassName); ! addImport(implementingClassName); ! ! fields.add(new Field(name, interfaceClassName.getName(), "new " + implementingClassName.getName() + "()", false) ); ! } ! } ! ! private void doArrays(Element classElement, String type) { ! for (Iterator arrays = classElement.getChildren(type).iterator(); arrays.hasNext();) { ! Element array = (Element) arrays.next(); ! String role = array.getAttributeValue("role"); ! String elementClass = array.getAttributeValue("element-class"); ! if (elementClass==null) { ! Element elt = array.getChild("element"); ! if (elt==null) elt = array.getChild("one-to-many"); ! if (elt==null) elt = array.getChild("many-to-many"); ! if (elt==null) elt = array.getChild("composite-element"); ! if (elt==null) { ! System.out.println("skipping collection with subcollections"); ! continue; ! } ! elementClass = elt.getAttributeValue("type"); ! if (elementClass==null) elementClass=elt.getAttributeValue("class"); } ! fields.add( new Field( role, getFieldType(elementClass) + "[]", false ) ); ! } ! } ! ! private String getFieldType(String hibernateType) { ! return getFieldType(hibernateType, false); ! } ! ! private String getFieldType(String hibernateType, boolean needObject) { ! // deal with hibernate binary type ! if ( hibernateType.equals("binary") ) { ! return "byte[]"; ! } ! else { ! Type basicType = TypeFactory.basic(hibernateType); ! if ( basicType!=null ) { ! ! if ( ! (basicType instanceof PrimitiveType) && ! !hibernateType.trim().equals( basicType.returnedClass().getName()) && ! !needObject ! ) { ! return ( (PrimitiveType) basicType ).primitiveClass().getName(); ! } ! else { ! return basicType.returnedClass().getName(); ! } ! } else { ! ClassName classType = new ClassName(); ! classType.setFullyQualifiedName(hibernateType); ! // add an import and field for this property ! addImport(classType); ! return classType.getName(); } ! } ! } ! ! ! } --- 77,333 ---- fields.add(new Field(cmpname, classType.getName(), false)); components.put( mapping.getCanonicalName(), mapping ); ! } ! } ! ! // derive the class imports and fields from the properties ! for (Iterator properties = propertyList.iterator(); properties.hasNext();) { ! Element property = (Element) properties.next(); ! ! String name = property.getAttributeValue("name"); ! if ( name == null || name.trim().equals("") ) { ! continue; //since an id doesn't necessarily need a name ! } ! ! // ensure that the type is specified ! String type = property.getAttributeValue("type"); ! if ( type == null || type.trim().equals("") ) { ! System.out.println("property \"" + name + "\" in class " + getName() + " is missing a type attribute"); ! continue; ! } ! ! // handle in a different way id and properties... ! // ids may be generated and may need to be of object type in order to support ! // the unsaved-value "null" value. ! // Properties may be nullable (whilst ids can not) ! if(property == id) { ! Element generator = property.getChild("generator"); ! String unsavedValue = property.getAttributeValue("unsaved-value"); ! boolean needObject = (unsavedValue != null && unsavedValue.equals("null")); ! boolean generated = !generator.getAttributeValue("class").equals("assigned"); ! Field idField = new Field(name, getFieldType(type, needObject), true, generated); ! fields.add(idField); ! } else { ! String notnull = property.getAttributeValue("not-null"); ! // if not-null property is missing lets see if it has been ! // defined at column level ! if(notnull == null) { ! Element column = property.getChild("column"); ! if(column != null) ! notnull = column.getAttributeValue("not-null"); } ! boolean nullable = (notnull == null || notnull.equals("false")); ! fields.add(new Field(name, getFieldType(type), nullable)); ! } ! } ! ! // many to ones - TODO: consolidate with code above ! for (Iterator manytoOnes = classElement.getChildren("many-to-one").iterator(); manytoOnes.hasNext();) { ! Element manyToOne = (Element) manytoOnes.next(); ! ! String name = manyToOne.getAttributeValue("name"); ! ! // ensure that the type is specified ! String type = manyToOne.getAttributeValue("class"); ! if ( type == null || type.trim().equals("") ) { ! System.out.println("many-to-one \"" + name + "\" in class " + getName() + " is missing a class attribute"); ! continue; ! } ! ClassName classType = new ClassName(); ! classType.setFullyQualifiedName(type); ! ! // is it nullable? ! String notnull = manyToOne.getAttributeValue("not-null"); ! boolean nullable = (notnull == null || notnull.equals("false")); ! ! // add an import and field for this property ! addImport(classType); ! Field f = new Field( name, classType.getName(), nullable ); ! f.setClassType(classType); ! fields.add(f); ! } ! ! // collections ! doCollections(classElement, "list", "java.util.List", "java.util.ArrayList"); ! doCollections(classElement, "map", "java.util.Map", "java.util.HashMap"); ! doCollections(classElement, "set", "java.util.Set", "java.util.HashSet"); ! doArrays(classElement, "array"); ! doArrays(classElement, "primitive-array"); ! ! ! // subclasses ! ! for ( Iterator iter = classElement.getChildren("subclass").iterator(); iter.hasNext(); ) { ! Element subclass = (Element) iter.next(); ! ClassMapping subclassMapping = new ClassMapping(name, subclass); ! subclasses.add(subclassMapping); ! } ! ! //components ! ! for ( Iterator iter = classElement.getChildren("component").iterator(); iter.hasNext(); ) { ! Element cmpe = (Element) iter.next(); ! String cmpname = cmpe.getAttributeValue("name"); ! String cmpclass = cmpe.getAttributeValue("class"); ! if ( cmpclass==null || cmpclass.equals("") ) { ! System.out.println("component \"" + cmpname + "\" in class " + getName() + " does not specify a class"); ! continue; ! } ! ClassMapping mapping = new ClassMapping(cmpe, true); ! ! ClassName classType = new ClassName(); ! classType.setFullyQualifiedName(cmpclass); ! // add an import and field for this property ! addImport(classType); ! fields.add(new Field(cmpname, classType.getName(), false)); ! components.put( mapping.getCanonicalName(), mapping ); ! } ! } ! ! public List getFields() { ! return fields; ! } ! ! public TreeSet getImports() { ! return imports; ! } ! ! public String getCanonicalName() { ! return name.getFullyQualifiedName(); ! } ! ! public String getName() { ! return name.getName(); ! } ! ! public String getProxy() { ! return proxyClass; ! } ! ! public String getPackageName() { ! return name.getPackageName(); ! } ! ! public List getSubclasses() { ! return subclasses; ! } ! ! public String getSuperClass() { ! return superClass; ! } ! ! ! // We need a minimal constructor only if it's different from ! // the full constructor or the no-arg constructor. ! // A minimal construtor is one that lets ! // you specify only the required fields. ! public boolean needsMinimalConstructor() { ! boolean generatedId = true; ! boolean missingId = true; ! int countNull = 0; ! for(Iterator it = fields.iterator(); it.hasNext(); ) { ! Field f = (Field) it.next(); ! if(f.isIdentifier()) { ! generatedId = f.isGenerated(); ! missingId = false; ! } ! else ! if(f.isNullable()) countNull++; ! } ! ! return !(countNull == 0 || ! ((countNull == (fields.size() - 1)) && generatedId) || ! ((countNull == (fields.size()) && missingId))); ! ! } ! ! private void addImport(ClassName className) { ! // if the package is java.lang or our own package don't add ! if ( !className.inJavaLang() && !className.inSamePackage(name) ) { ! imports.add( className.getFullyQualifiedName() ); ! } ! } ! ! public static Iterator getComponents() { ! return components.values().iterator(); ! } ! ! private void doCollections(Element classElement, String xmlName, String interfaceClass, String implementingClass) { ! ! ClassName interfaceClassName = new ClassName(); ! ClassName implementingClassName = new ClassName(); ! ! interfaceClassName.setFullyQualifiedName(interfaceClass); ! implementingClassName.setFullyQualifiedName(implementingClass); ! ! for (Iterator collections = classElement.getChildren(xmlName).iterator(); collections.hasNext();) { ! Element collection = (Element) collections.next(); ! ! String name = collection.getAttributeValue("role"); ! ! // add an import and field for this collection ! addImport(interfaceClassName); ! addImport(implementingClassName); ! ! fields.add(new Field(name, interfaceClassName.getName(), "new " + implementingClassName.getName() + "()", false) ); ! } ! } ! ! private void doArrays(Element classElement, String type) { ! for (Iterator arrays = classElement.getChildren(type).iterator(); arrays.hasNext();) { ! Element array = (Element) arrays.next(); ! String role = array.getAttributeValue("role"); ! String elementClass = array.getAttributeValue("element-class"); ! if (elementClass==null) { ! Element elt = array.getChild("element"); ! if (elt==null) elt = array.getChild("one-to-many"); ! if (elt==null) elt = array.getChild("many-to-many"); ! if (elt==null) elt = array.getChild("composite-element"); ! if (elt==null) { ! System.out.println("skipping collection with subcollections"); ! continue; ! } ! elementClass = elt.getAttributeValue("type"); ! if (elementClass==null) elementClass=elt.getAttributeValue("class"); ! } ! fields.add( new Field( role, getFieldType(elementClass) + "[]", false ) ); ! } ! } ! ! private String getFieldType(String hibernateType) { ! return getFieldType(hibernateType, false); ! } ! ! private String getFieldType(String hibernateType, boolean needObject) { ! // deal with hibernate binary type ! if ( hibernateType.equals("binary") ) { ! return "byte[]"; ! } ! else { ! Type basicType = TypeFactory.basic(hibernateType); ! if ( basicType!=null ) { ! ! if ( ! (basicType instanceof PrimitiveType) && ! !hibernateType.trim().equals( basicType.returnedClass().getName()) && ! !needObject ! ) { ! return ( (PrimitiveType) basicType ).primitiveClass().getName(); } else { ! return basicType.returnedClass().getName(); } ! ! } ! else { ! ClassName classType = new ClassName(); ! classType.setFullyQualifiedName(hibernateType); ! // add an import and field for this property ! addImport(classType); ! return classType.getName(); ! } ! } ! } ! ! ! } |
From: <one...@us...> - 2002-11-14 15:01:52
|
Update of /cvsroot/hibernate/Hibernate/doc/reference/html_single In directory usw-pr-cvs1:/tmp/cvs-serv21912/doc/reference/html_single Modified Files: index.html Log Message: recompiled Index: index.html =================================================================== RCS file: /cvsroot/hibernate/Hibernate/doc/reference/html_single/index.html,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** index.html 7 Nov 2002 16:24:09 -0000 1.77 --- index.html 14 Nov 2002 15:01:49 -0000 1.78 *************** *** 298,302 **** If you wish to use JVM-level caching of mutable data in a JTA environment, you must specify a strategy for obtaining the JTA <tt>TransactionManager</tt>. ! </p><table class="simplelist" border="0" summary="Simple list"><tr><td><tt>cirrus.hibernate.transaction.JBossTransactionManagerLookup</tt></td><td>for JBoss</td></tr><tr><td><tt>cirrus.hibernate.transaction.WeblogicTransactionManagerLookup</tt></td><td>for Weblogic</td></tr><tr><td><tt>cirrus.hibernate.transaction.WebSphereTransactionManagerLookup</tt></td><td>for WebSphere</td></tr></table><p> If you wish to have the <tt>SessionFactory</tt> bound to a JNDI namespace, specify a name (eg. <tt>hibernate/session_factory</tt>) as using the property --- 298,302 ---- If you wish to use JVM-level caching of mutable data in a JTA environment, you must specify a strategy for obtaining the JTA <tt>TransactionManager</tt>. ! </p><table class="simplelist" border="0" summary="Simple list"><tr><td><tt>cirrus.hibernate.transaction.JBossTransactionManagerLookup</tt></td><td>for JBoss</td></tr><tr><td><tt>cirrus.hibernate.transaction.WeblogicTransactionManagerLookup</tt></td><td>for Weblogic</td></tr><tr><td><tt>cirrus.hibernate.transaction.WebSphereTransactionManagerLookup</tt></td><td>for WebSphere</td></tr><tr><td><tt>cirrus.hibernate.transaction.OrionTransactionManagerLookup</tt></td><td>for Orion</td></tr></table><p> If you wish to have the <tt>SessionFactory</tt> bound to a JNDI namespace, specify a name (eg. <tt>hibernate/session_factory</tt>) as using the property |
From: <one...@us...> - 2002-11-14 15:01:52
|
Update of /cvsroot/hibernate/Hibernate/doc/reference/html In directory usw-pr-cvs1:/tmp/cvs-serv21912/doc/reference/html Modified Files: session-configuration.html Log Message: recompiled Index: session-configuration.html =================================================================== RCS file: /cvsroot/hibernate/Hibernate/doc/reference/html/session-configuration.html,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** session-configuration.html 27 Oct 2002 11:48:37 -0000 1.23 --- session-configuration.html 14 Nov 2002 15:01:49 -0000 1.24 *************** *** 211,215 **** If you wish to use JVM-level caching of mutable data in a JTA environment, you must specify a strategy for obtaining the JTA <tt>TransactionManager</tt>. ! </p><table class="simplelist" border="0" summary="Simple list"><tr><td><tt>cirrus.hibernate.transaction.JBossTransactionManagerLookup</tt></td><td>for JBoss</td></tr><tr><td><tt>cirrus.hibernate.transaction.WeblogicTransactionManagerLookup</tt></td><td>for Weblogic</td></tr><tr><td><tt>cirrus.hibernate.transaction.WebSphereTransactionManagerLookup</tt></td><td>for WebSphere</td></tr></table><p> If you wish to have the <tt>SessionFactory</tt> bound to a JNDI namespace, specify a name (eg. <tt>hibernate/session_factory</tt>) as using the property --- 211,215 ---- If you wish to use JVM-level caching of mutable data in a JTA environment, you must specify a strategy for obtaining the JTA <tt>TransactionManager</tt>. ! </p><table class="simplelist" border="0" summary="Simple list"><tr><td><tt>cirrus.hibernate.transaction.JBossTransactionManagerLookup</tt></td><td>for JBoss</td></tr><tr><td><tt>cirrus.hibernate.transaction.WeblogicTransactionManagerLookup</tt></td><td>for Weblogic</td></tr><tr><td><tt>cirrus.hibernate.transaction.WebSphereTransactionManagerLookup</tt></td><td>for WebSphere</td></tr><tr><td><tt>cirrus.hibernate.transaction.OrionTransactionManagerLookup</tt></td><td>for Orion</td></tr></table><p> If you wish to have the <tt>SessionFactory</tt> bound to a JNDI namespace, specify a name (eg. <tt>hibernate/session_factory</tt>) as using the property |
From: <one...@us...> - 2002-11-14 14:58:49
|
Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools/reverse In directory usw-pr-cvs1:/tmp/cvs-serv20883/cirrus/hibernate/tools/reverse Modified Files: MapGenerator.java Log Message: fixed compile prob Index: MapGenerator.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/tools/reverse/MapGenerator.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MapGenerator.java 14 Nov 2002 11:28:56 -0000 1.2 --- MapGenerator.java 14 Nov 2002 14:58:45 -0000 1.3 *************** *** 549,572 **** } - - /** - * @param args the command line arguments - */ - public static void main(String[] args) throws Exception { - MapGenerator mg = new MapGenerator(); - mg.setPackageName("com.mtd"); - mg.setSchemaPattern("postgres"); - mg.setGenerator("sequence"); - mg.setIdType("java.lang.Long"); - mg.setGeneratorParameters(new String[] {"fooSequence" }); - mg.setOutputDirectory(new File("c:\\temp")); - mg.setMappingFile("test.hbm.xml"); - //oracle.jdbc.OracleDriver.class.getName(); - org.postgresql.Driver.class.getName(); - Connection connection = DriverManager.getConnection("jdbc:postgresql:template1", "postgres", ""); - mg.generate(connection); - connection.close(); - } - /** Getter for property hibernateTypes. * @return Value of property hibernateTypes. --- 549,552 ---- |
From: <one...@us...> - 2002-11-14 12:57:40
|
Update of /cvsroot/hibernate/Hibernate/doc In directory usw-pr-cvs1:/tmp/cvs-serv29012/doc Modified Files: faq.aft faq.aft-TOC faq.html Log Message: new doco for 1.2 beta 2 Index: faq.aft =================================================================== RCS file: /cvsroot/hibernate/Hibernate/doc/faq.aft,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** faq.aft 10 Nov 2002 03:40:54 -0000 1.28 --- faq.aft 14 Nov 2002 12:57:37 -0000 1.29 *************** *** 142,145 **** --- 142,149 ---- 3. use a table-per-concrete-class mapping strategy for the |Transaction| hierarchy + *** Hibernate won't read a named query from the mapping file + + You must begin the |CDATA| section _immediately_ after the opening |<query>| tag. Otherwise the XML parser will create an extra node between the |<query>| tag and the |CDATA| section. + ** tips and tricks Index: faq.aft-TOC =================================================================== RCS file: /cvsroot/hibernate/Hibernate/doc/faq.aft-TOC,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** faq.aft-TOC 10 Nov 2002 03:40:54 -0000 1.19 --- faq.aft-TOC 14 Nov 2002 12:57:37 -0000 1.20 *************** *** 19,22 **** --- 19,23 ---- * {-I'm supplying my own connections to Hibernate and I see exceptions like: "too many opened cursors"@I'm supplying my own connections to Hibernate and I see exceptions like: "too many opened cursors"-} * {-My class has two one-to-many associations to different subclasses of the same root class, but Hibernate ignores the actual concrete class when loading the associations.@My class has two one-to-many associations to different subclasses of the same root class, but Hibernate ignores the actual concrete class when loading the associations.-} + * {-Hibernate won't read a named query from the mapping file@Hibernate won't read a named query from the mapping file-} * {-tips and tricks@tips and tricks-} * {-How can I count the number of query results without actually returning them?@How can I count the number of query results without actually returning them?-} Index: faq.html =================================================================== RCS file: /cvsroot/hibernate/Hibernate/doc/faq.html,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** faq.html 10 Nov 2002 03:40:54 -0000 1.41 --- faq.html 14 Nov 2002 12:57:37 -0000 1.42 *************** *** 42,45 **** --- 42,46 ---- <li> <a href="#I'm supplying my own connections to Hibernate and I see exceptions like: "too many opened cursors"">I'm supplying my own connections to Hibernate and I see exceptions like: "too many opened cursors"</a></li> <li> <a href="#My class has two one-to-many associations to different subclasses of the same root class, but Hibernate ignores the actual concrete class when loading the associations.">My class has two one-to-many associations to different subclasses of the same root class, but Hibernate ignores the actual concrete class when loading the associations.</a></li> + <li> <a href="#Hibernate won't read a named query from the mapping file">Hibernate won't read a named query from the mapping file</a></li> </ul> <li> <a href="#tips and tricks">tips and tricks</a></li> *************** *** 262,265 **** --- 263,271 ---- <li> use a table-per-concrete-class mapping strategy for the <tt>Transaction</tt> hierarchy</li> </ol> + <!--End Section 3--> + <h4><a name="Hibernate won't read a named query from the mapping file">Hibernate won't read a named query from the mapping file</a></h4> + <p class="Body"> + You must begin the <tt>CDATA</tt> section <strong>immediately</strong> after the opening <tt><query></tt> tag. Otherwise the XML parser will create an extra node between the <tt><query></tt> tag and the <tt>CDATA</tt> section. + </p> <!--End Section 3--> <!-- End SectLevel3 --> |