Skip site navigation (1) Skip section navigation (2)

Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Samuel Gendler <sgendler(at)ideasculptor(dot)com>
Cc: Oliver Jowett <oliver(at)opencloud(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-jdbc(at)postgresql(dot)org, stagirus <mamasa(at)stagirus(dot)com>
Subject: Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)
Date: 2010-09-28 04:51:11
Message-ID: 4CA1743F.2060301@postnewspapers.com.au (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-jdbc
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/

In response to

Responses

pgsql-bugs by date

Next:From: Craig RingerDate: 2010-09-28 05:00:23
Subject: Re: BUG #5679: pgAdminIII 1.12.0 hangs
Previous:From: Sergey BurladyanDate: 2010-09-28 03:41:55
Subject: psql: cannot run DISCARD ALL with AUTOCOMMIT = 'off'

pgsql-jdbc by date

Next:From: Craig RingerDate: 2010-09-28 06:11:53
Subject: Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)
Previous:From: knirckyDate: 2010-09-28 04:28:25
Subject: Re: setQueryTimout()

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group