tiborm
Posts: 1
Nickname: tibor13
Registered: Jun, 2004
|
|
Hibernate - Criteria
|
Posted: Jun 14, 2004 4:20 AM
|
|
Advertisement
|
Hi,
Iam using Hibernate's Criteria for DB select's. How can I execute 'select * from Object1 where id=4 or id=5' - I cant add a simple 'OR condition' :-(
Thank's,
Tibor
public static void main(String[] args) throws Exception { Criteria crit = session.createCriteria( Object1.class); crit.add( Expression.eq( "id", new Long( 4))); //???? System.out.print( "list size: " + crit.list().size()); }
|
|