From: <one...@us...> - 2003-03-12 08:24:26
|
Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test In directory sc8-pr-cvs1:/tmp/cvs-serv23801/hibernate/test Modified Files: FooBarTest.java Log Message: added con/dis-junctions and ilike operator Index: FooBarTest.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/test/FooBarTest.java,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** FooBarTest.java 9 Mar 2003 04:04:09 -0000 1.40 --- FooBarTest.java 12 Mar 2003 08:24:24 -0000 1.41 *************** *** 148,151 **** --- 148,162 ---- .list(); assertTrue( list.size()==1 && list.get(0)==f ); + + list = s.createCriteria(Foo.class).add( + Expression.disjunction() + .add( Expression.eq( "integer", f.getInteger() ) ) + .add( Expression.like( "string", f.getString() ) ) + .add( Expression.eq( "boolean", f.getBoolean() ) ) + ) + .add( Expression.isNotNull("boolean") ) + .list(); + assertTrue( list.size()==1 && list.get(0)==f ); + list = s.createCriteria(Foo.class) .add( Expression.or( |