Re: Bug: Cannot pass null in Parameter in Query for ISNULL - Mailing list pgsql-jdbc

From Mikko Tiihonen
Subject Re: Bug: Cannot pass null in Parameter in Query for ISNULL
Date
Msg-id 4ED74716.7070904@nitorcreations.com
Whole thread Raw
In response to Re: Bug: Cannot pass null in Parameter in Query for ISNULL  (bht@actrix.gen.nz)
Responses Re: Bug: Cannot pass null in Parameter in Query for ISNULL
List pgsql-jdbc
On 12/01/2011 09:58 AM, bht@actrix.gen.nz wrote:
> Hi Oliver,
>
> Thanks for your reply. Onfortunately I cannot see a solution in your
> elaboration. However I am still confident that there will be one at
> some point in the future.
>
>  From an application perspective it is of course nonsense to code
> variations of the same SQL statement depending on parameters having
> specific values as required by the workaround. In case of JPA this
> option does not even exist.
>
> A Java application programmer has to go through extreme hassle in such
> a simple case. That hassle is not worth it.

So far it has been established that the JPA implementation you are
using uses an unportable hack that happens to work for some DB vendors
but not with postgresql.

Can you comment on why our proposal to remove the hack from the JPA
implementation and replace it with the JDBC recommended way of sending
NULL is not the correct way forward?

This would enable the JPA driver to work with any DB vendor providing
a standard compliant JDBC driver such as postgres, mysql, oracle etc.

As the promise of a JPA layer is to abstract the DB specifics away,
when you report the issue to your JPA vendor it should be of high
priority to them to fix their code. In this particular case the
JPA implementation has the correct type information readily at hand
but the forgets to pass it to the JDBC driver as recommeneded in
JDBC specification.

PS. Have you tried if a newer version of the JPA implementation you are
using has already fixed the problem?

-Mikko

pgsql-jdbc by date:

Previous
From: bht@actrix.gen.nz
Date:
Subject: Re: Bug: Cannot pass null in Parameter in Query for ISNULL
Next
From: Oliver Jowett
Date:
Subject: Re: Bug: Cannot pass null in Parameter in Query for ISNULL