As a fundamental protocol, I prefer to keep any "attitudes" and
"finger-pointing" off the table. Let us just focus on the real
Though I am very versatile in speaking languages like C, C++ and Java, I
assumed we all can speak and understand "English." You can also clearly see
the issue on table is complicated. It spans Java, Hibernate, JDBC Drivers,
RDBMS Engines and and finally people.
Yes, the error is like - column "y" is of type integer but expression is of
type boolean. I just expressed it in natural language "type mismatch."
Below is the sample HBM file block.
<property name="deleted" type="boolean">
<column name="DELETED" />
In the DB, DELETED column is SMALLINT but in the Java(POJOs), it is boolean.
I like Dean's suggestion about "hibernate.query.substitutions." But does it
really solve the issue? The current code (HBM mapping) is fully functional
with Oracle (SMALLINT).
That leaves us only two variables in the equation:
1. PostgresQL JDBC Driver
2. PostgresQL DB Engine.
During my research on your JDBC discussion forum, I learned that JDBC team
is mapping Java boolean to BIT or chars. Please refer this discussion.
Please refer to the following data type mapping between Java types and SQL
Is there any similar mapping reference for PostgresQL data types? (Seems
this question was already raised and successfully ignored!)
ARE THERE ANY ALTERNATIVE (3rd-party) JDBC DRIVERs FOR POSTGRESQL? In this
day & age compatibility with Hibernate got to be a key goal for any RDBMS.
View this message in context: http://postgresql.1045698.n5.nabble.com/Mapping-Hibernate-boolean-to-smallint-Postgresql-tp2853280p2853928.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.
In response to
pgsql-bugs by date
|Next:||From: Peter Eisentraut||Date: 2010-09-25 19:38:38|
|Subject: Re: libpq: system-wide root.crt|
|Previous:||From: Kirill Simonov||Date: 2010-09-25 18:33:16|
|Subject: LEFT OUTER JOIN sub-SELECT produces a column != NULL when all NULLs