pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Glenn Holmer <gholmer@weycogroup.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: smallint vs. boolean (was invalid string enlargement
Date: Wed, 13 Apr 2005 10:09:55 +1200
Message-ID: <425C4733.7060107@opencloud.com> (raw)
In-Reply-To: <1113325530.26370.50.camel@shadow.weycogroup.com>
References: <42389DFC.5090408@weycogroup.com>
	<4238A223.4030003@opencloud.com>
	<4239B075.7020305@weycogroup.com>
	<4239EA95.4020101@opencloud.com>
	<1113325530.26370.50.camel@shadow.weycogroup.com>

Glenn Holmer wrote:
> On Fri, 2005-03-18 at 09:37 +1300, Oliver Jowett wrote:

>>This behaviour is unlikely to change, so you might want to look at 
>>tracking down the cause. As a last resort, you might be able to create 
>>implicit casts between smallint<->boolean.
> 
> 
> Yes, the database has some fields defined as smallint and set to 0 for
> false or either 1 for true; the Hibernate DTOs have these fields
> declared as boolean.
> 
> Is there any way around this without rewriting everything?

Change the column type so it is a boolean, change the hibernate mapping
so it calls setShort(), or create the implicit cast as I suggested.

-O



view thread (3+ messages)  latest in thread

Message-ID: <425C4733.7060107@opencloud.com>
Permalink:  ../425C4733.7060107@opencloud.com/
Also on:    postgresql.org/message-id/425C4733.7060107@opencloud.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: oliver@opencloud.com, gholmer@weycogroup.com
  Subject: Re: smallint vs. boolean (was invalid string enlargement
  In-Reply-To: <425C4733.7060107@opencloud.com>
  References: <42389DFC.5090408@weycogroup.com> <4238A223.4030003@opencloud.com> <4239B075.7020305@weycogroup.com> <4239EA95.4020101@opencloud.com> <1113325530.26370.50.camel@shadow.weycogroup.com> <425C4733.7060107@opencloud.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox