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

Re: Inserting "null" not working (Sun App Server, Postgres, EJB3)?

From: aaabdallah(at)gmail(dot)com
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Inserting "null" not working (Sun App Server, Postgres, EJB3)?
Date: 2007-03-02 05:47:45
Message-ID: 1172814465.505368.169610@j27g2000cwj.googlegroups.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
On Mar 1, 11:48 pm, heiko(dot)r(dot)(dot)(dot)(at)redhat(dot)com ("Heiko W.Rupp") wrote:
> Hi,
>
> Am 01.03.2007 um 15:04 schrieb Ahmed Abd-el-Shafy Abd-Allah:
>
> > Internal Exception: org.postgresql.util.PSQLException : ERROR: column
> > "pools" is of type smallint but expression is of type character
> > varyingError Code: 0
>
> > Call:INSERT INTO MYTABLE (POOLS) VALUES (?)
> > bind => [ null]
> > Query:InsertObjectQuery(aaacs(dot)rex(dot)ejb(dot)entities(dot)MyTable(at)10b287f)
>
> We have the very same problem with JBoss EJB3 and Postgres.
> Our "solution" is to get the underlying Hibernate session via
> EntityManager.getDelegate() and call the setNull()  (?)  Method
> from Hibernate for this. So the problem is twofold:
> - EJB3 being too stupid to have a setNull() method
> - Postgres JDBC driver not automatically the right thing anyway
>
>    Heiko
>
> --
> Heiko W.Rupp
> heiko(dot)r(dot)(dot)(dot)(at)redhat(dot)com,http://www.dpunkt.de/buch/3-89864-429-4.html
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend

Could you explain that a bit more, or better yet show a code sample? I
can get the delegate of course, but to go from there to setNull - you
lost me.

thanks!


In response to

pgsql-jdbc by date

Next:From: Heiko W.RuppDate: 2007-03-02 07:30:58
Subject: Re: Inserting "null" not working (Sun App Server, Postgres, EJB3)?
Previous:From: Dave CramerDate: 2007-03-02 03:17:26
Subject: Re: statement caching proof of concept redux

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