Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 7A055133729E for ; Tue, 28 Sep 2010 01:51:20 -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 25600-05 for ; Tue, 28 Sep 2010 04:51:13 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.postnewspapers.com.au (202-89-185-120.static.dsl.amnet.net.au [202.89.185.120]) by mail.postgresql.org (Postfix) with ESMTP id 20336133655C for ; Tue, 28 Sep 2010 01:51:13 -0300 (ADT) Received: from [10.0.0.53] (wallace.localnet [10.0.0.53]) by mail.postnewspapers.com.au (Postfix) with ESMTP id 9A36DAF708; Tue, 28 Sep 2010 12:51:11 +0800 (WST) Message-ID: <4CA1743F.2060301@postnewspapers.com.au> Date: Tue, 28 Sep 2010 12:51:11 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4 MIME-Version: 1.0 To: Samuel Gendler CC: Oliver Jowett , Kevin Grittner , pgsql-jdbc@postgresql.org, stagirus Subject: Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql) References: <4CA064B50200002500035F29@gw.wicourts.gov> <1285601721239-2855475.post@n5.nabble.com> <4CA0805B0200002500035F43@gw.wicourts.gov> <4CA101E3.5080005@opencloud.com> In-Reply-To: X-Enigmail-Version: 1.0.1 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/66 X-Sequence-Number: 20936 On 28/09/10 07:01, Samuel Gendler wrote: > I would actually suggest running your problem past the hibernate > community. It seems unlikely that you're the first team to encounter > this problem. How do you have the property mapped in the hibernate > mapping? Is it possible that explicitly setting the hibernate type of > the property in the mapping will solve your problem? There's way too much guesswork happening here. OP ("stagirus"), please supply *code*, *stack traces* and *exact error messages*. Please show at least one mapping that you are having problems with - the Java class with annotations, or if you're using XML mapping the associated XML configuration. Show the stack trace that results from the failure, and what appears in the PostgreSQL error logs. Even better, produce buildable source code that demonstrates your problem without depending on other parts of your application. If you don't use Hibernate's DDL generation to populate your database, include a SQL script containing you would use to populate the database too. This should be a twenty minute job for any competent developer on your team. That way, instead of lots of hand-waving and guesswork, it'll be possible to discuss concrete problems and possible solutions. You should also specify: - Your Hibernate version - How you're mapping your entity classes - Your PostgreSQL JDBC driver versions - What dialect, if any, is configured for Hibernate - Your JDK version - Which version of PostgreSQL you are targeting See: http://wiki.postgresql.org/wiki/Guide_to_reporting_problems Personally, I suspect you're overriding Hibernate's DDL generation but not its type mappings, so the PostgreSQL dialect can't do it's job. But without actual code, it's nigh-on impossible to tell. -- Craig Ringer Tech-related writing: http://soapyfrogs.blogspot.com/