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> |