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.rex.ejb.entities.MyTable@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.rupp@redhat.com, http://www.dpunkt.de/buch/3-89864-429-4.html