Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 9EC121336971 for ; Wed, 29 Sep 2010 10:03:09 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 19637-10 for ; Wed, 29 Sep 2010 13:02:59 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by mail.postgresql.org (Postfix) with ESMTP id 39A4C1337B58 for ; Wed, 29 Sep 2010 10:02:59 -0300 (ADT) Received: from 121-98-80-66.bitstream.orcon.net.nz ([121.98.80.66] helo=[192.168.1.2]) by tremor.opencloud.co.nz with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1P0wJD-0005Rk-G8; Thu, 30 Sep 2010 02:02:55 +1300 Message-ID: <4CA338F8.80902@opencloud.com> Date: Thu, 30 Sep 2010 02:02:48 +1300 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.24 (X11/20100411) MIME-Version: 1.0 To: stagirus CC: pgsql-jdbc@postgresql.org Subject: Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql) References: <1285601721239-2855475.post@n5.nabble.com> <4CA0805B0200002500035F43@gw.wicourts.gov> <4CA101E3.5080005@opencloud.com> <4CA1743F.2060301@postnewspapers.com.au> <4CA18729.90401@postnewspapers.com.au> <1285701298407-2865634.post@n5.nabble.com> <4CA22C3C0200002500036065@gw.wicourts.gov> <1285716712781-2916249.post@n5.nabble.com> <4CA28CCB.5020400@opencloud.com> <1285762010765-3005405.post@n5.nabble.com> In-Reply-To: <1285762010765-3005405.post@n5.nabble.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201009/81 X-Sequence-Number: 20951 stagirus wrote: > Oliver: >>> * use a real boolean column in their schema (I mean, the data you're > representing IS a boolean value in this case, right?); > --- No, we already tried this path. Unfortunately boolean is not portable > column type among DB vendors. So, we ruled out this option. You can't ship different DDL for different vendors? I thought part of the point of using a mapping layer like Hibernate was so Hibernate could handle the details of the mapping to different DBs (which might be done in different ways) without having to know about the different mappings in your application. So a Java boolean might be mapped to either a Postgresql boolean or an Oracle SMALLINT (since oracle doesn't have a real boolean type?), but your app code doesn't care about that detail - it's just dealing with a Java boolean either way. -O