boolean « Field « JPA Q&A





1. How to use a int2 database-field as a boolean in Java using JPA/Hibernate    stackoverflow.com

I write an application based on an already existing database (postgreSQL) using JPA and Hibernate. There is a int2-column (activeYN) in a table, which is used as a boolean (0 => ...

2. JPA configure boolean fields to persist as integers    stackoverflow.com

In JPA is there an annotation to specify that boolean fields should be persisted as an integer. I'm using OpenJPA and it's currently persisting boolean fields as bits. I'd rather use integer ...

3. How to query Boolean field ????????    forum.hibernate.org

4. HQL query with boolean field    forum.hibernate.org

5. NULL values in Boolean field    forum.hibernate.org

Hi, I accidentally posted this query on NHibernate Users group! Apologies for that. I have a java class, with a member called "nativeFlag", which is of type java.lang.Boolean. (which means that it's nullable). In the mapping file, I haven't explicitly mentioned any type for nativeFlag. When my table is created, the "nativeFlag" field is stored as a "tinyint" column in my ...