I have a problem trying to use Derby with
Hibernate version:3.2.5.ga
where the hibernate configuration looks like
Code:
<property name="hibernate.connection.driver_class">org.apache.derby.jdbc.EmbeddedDriver</property>
<property name="hibernate.connection.url">jdbc:derby:whatson;create=true</property>
<property name="hibernate.dialect">org.hibernate.dialect.DerbyDialect</property>
<property name="hibernate.query.substitutions">true 1, false 0</property>
when I try to execute a query resulted from
Code:
Disjunction dis = Expression.disjunction();
if(saturday)
dis.add(Restrictions.eq("saturday",true));
if(sunday)
dis.add(Restrictions.eq("sunday",true));
if(monday)
dis.add(Restrictions.eq("monday",true));
if(tuesday)
dis.add(Restrictions.eq("tuesday",true));
if(wednesday)
dis.add(Restrictions.eq("wednesday",true));
if(thursday)
dis.add(Restrictions.eq("thursday",true));
if (friday)
dis.add(Restrictions.eq("friday",true));
hibernate does not replace "true " with 1 ( as stated in the hibernate config file and the query fails because Derby does not have boolean type.