pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <craig@postnewspapers.com.au>
To: Samuel Gendler <sgendler@ideasculptor.com>
Cc: Oliver Jowett <oliver@opencloud.com>
Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: pgsql-jdbc@postgresql.org
Cc: stagirus <mamasa@stagirus.com>
Subject: Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)
Date: Tue, 28 Sep 2010 12:51:11 +0800
Message-ID: <4CA1743F.2060301@postnewspapers.com.au> (raw)
In-Reply-To: <AANLkTi=OgduBWb4XLo3bqUXJULNEvUKCAh54xhiEgOjU@mail.gmail.com>
References: <4CA064B50200002500035F29@gw.wicourts.gov>
	<1285601721239-2855475.post@n5.nabble.com>
	<4CA0805B0200002500035F43@gw.wicourts.gov>
	<4CA101E3.5080005@opencloud.com>
	<AANLkTi=OgduBWb4XLo3bqUXJULNEvUKCAh54xhiEgOjU@mail.gmail.com>

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/



view thread (53+ messages)  latest in thread

Message-ID: <4CA1743F.2060301@postnewspapers.com.au>
Permalink:  ../4CA1743F.2060301@postnewspapers.com.au/
Also on:    postgresql.org/message-id/4CA1743F.2060301@postnewspapers.com.au

 · 

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: craig@postnewspapers.com.au, sgendler@ideasculptor.com, oliver@opencloud.com, Kevin.Grittner@wicourts.gov, mamasa@stagirus.com
  Subject: Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)
  In-Reply-To: <4CA1743F.2060301@postnewspapers.com.au>
  References: <4CA064B50200002500035F29@gw.wicourts.gov> <1285601721239-2855475.post@n5.nabble.com> <4CA0805B0200002500035F43@gw.wicourts.gov> <4CA101E3.5080005@opencloud.com> <AANLkTi=OgduBWb4XLo3bqUXJULNEvUKCAh54xhiEgOjU@mail.gmail.com> <4CA1743F.2060301@postnewspapers.com.au>

* 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