Thread: Boolean type
I use the Java EJB2.0 standards for creating entitiy beans which are persisted to a PostGreSQL database. I create an entity bean with a boolean attribute with value 'true'. In the database the record is inserted and the field value is set to 1. When I retrieve the entity bean attributes with a findByPrimaryKey() finder method, the getAttribute() result is 'false' for the inserted 'true' value. Is this a type mapping/conversion setting that needs to be set for the application server (JBoss 3.0-alpha) or does it have to do with the JDBC driver I am using ( I use the driver that came with the Cygwin package, ie postgresql.jar)? Thanks and regards. Jacques Nortjé
No, this would be a bug. Can you try the latest jar from jdbc.postgresql.org. If the problem persists, then we can address it. Dave -----Original Message----- From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Nortje, Jacques Sent: Tuesday, March 05, 2002 12:30 AM To: pgsql-jdbc@postgresql.org Subject: [JDBC] Boolean type I use the Java EJB2.0 standards for creating entitiy beans which are persisted to a PostGreSQL database. I create an entity bean with a boolean attribute with value 'true'. In the database the record is inserted and the field value is set to 1. When I retrieve the entity bean attributes with a findByPrimaryKey() finder method, the getAttribute() result is 'false' for the inserted 'true' value. Is this a type mapping/conversion setting that needs to be set for the application server (JBoss 3.0-alpha) or does it have to do with the JDBC driver I am using ( I use the driver that came with the Cygwin package, ie postgresql.jar)? Thanks and regards. Jacques Nortjé ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster
Hi to all, This is my first msg in this list and I hope it isn't OT... I've a java server application that accecc a database using a JDBC driver. Due to compare the postgres performances I made two tests with the same java server using MS Sql 2000 and Postgres 7.2 as database. The test reports a time 3 or 4 time longer when using postgres. How can I investigate if the bottleneck is the driver or the database? My first idea is a measure of query execution time with psql and via JDBC; how can I do that? TIA, Auri