[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] Cannot pass null parameter
|
It is still not clear to me what the SQL you are expecting is.
I run the following SQL against Derby:
"select * from auction_bid where (null is null)"
And I get basically the same exception as you report in the bug. I am not sure
what EclipseLink could do about this. Is there a further exception, or more
details about the problem.
When I run the above query against MySQL and against Oracle, it succeeds. Based
on the details in the bug, this appears to be a limitation of Derby (and if the
exception is the same, PostGreSQL) Can you help me understand why it is not.
Thanks,
-Tom
On 31/10/2011 2:30 PM, bht@xxxxxxxxxxxxx wrote:
Both JavaDB and Postgresql
Regards,
Bernard
On Mon, 31 Oct 2011 13:35:43 -0400, you wrote:
What SQL is open jpa producing?
What DB are you on?
I believe the EclipseLink SQL will work on some databases.
-Tom
On 31/10/2011 1:35 PM, bht@xxxxxxxxxxxxx wrote:
Hi Tom,
In principle, I don't want to suggest any constraints on what SQL
EclipseLink should produce. The examples at
http://en.wikipedia.org/wiki/Java_Persistence_Query_Language#Examples
contain a compact JPQL as follows
SELECT a FROM Author a WHERE :lastName IS NULL OR LOWER(a.lastName) =
:lastName
which I have used successfully with OpenJPA in other projects.
This type of query is very useful especially when expanded for
querying a large number of fields with only a sub-set of user-supplied
values, without having to generate the query in code which is a lot of
work and risky, or even more work but less risky when using the
criteria API.
In
https://bugs.eclipse.org/bugs/show_bug.cgi?id=362414
I plugged in OpenJPA with the following persistence.xml modifications:
<property name="openjpa.Log" value="SQL=TRACE"/>
<property name="openjpa.jdbc.SynchronizeMappings"
value="buildSchema(SchemaAction='add,deleteTableContents',ForeignKeys=true)"/>
and
-javaagent:openjpa-all-2.1.1.jar
Their solution might not be EclipseLink's final solution, so
EclipseLink might in the end do something more intelligent - as long
as it works, that would be fine with me.
The testcase is somewhat special because it queries related Region not
basic CustomerOrder so I should have added a basic case, too.
Kind Regards,
Bernard
On Mon, 31 Oct 2011 08:27:52 -0400, you wrote:
Hi Bernard,
The exception you are getting is a SQLException. That comes from your
database, not EclipseLink. What SQL are you expecting us to produce?
-Tom
On 29/10/2011 10:51 PM, bht@xxxxxxxxxxxxx wrote:
Hi,
Please help me find a workaround for
Cannot pass null in Parameter as Identification variable or Primitive
https://bugs.eclipse.org/bugs/show_bug.cgi?id=362414
I am really perplexed because this seems to be quite basic. I made a
cross check - it works in OpenJPA.
Thanks,
Bernard
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users