I have a problem with querying Derby database. I am using Hibernate with JPA. Problem is related (probably) to boolean columns. Each query ends with error:
org.h
Downgrade didn't helped. Here is valid solution which works for me:
import java.sql.Types;
import org.hibernate.dialect.DerbyTenSevenDialect;
public class DerbyDialect extends DerbyTenSevenDialect {
public DerbyDialect() {
// fix Derby dialect boolean data type mapping error
registerColumnType(Types.BOOLEAN, "INTEGER");
}
}
I guess it is better to configure 'true' and 'false' constants mapping in dialect to Derby data type, but above is good enough for now.