Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Native Query using function not finding primary key (When calling a function, EL unable to decode result correctly)
Native Query using function not finding primary key [message #807707] Sun, 26 February 2012 17:53 Go to previous message
Hal Hildebrand is currently offline Hal Hildebrand
Messages: 12
Registered: February 2012
Junior Member
I create a simple function which selects all the rows in a table. I then create a Native query which calls this function, setting the resultClass to the entity that maps to the result of the function. When run, Eclipselink fails with the following error:

Exception Description: The primary key read from the row [ArrayRecord(
=> (2,bar,1))] during the execution of the query was detected to be null. Primary keys must not contain null.
Query: ReadAllQuery(name="relationship.getAll" referenceClass=Relationship sql="select r from test.get_relationships() as r")


Attached is a complete test case for this problem.

[Updated on: Sun, 26 February 2012 19:56]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:Recommended Practise: Consistent Timestamp for Unit of Work
Next Topic:NOT NULL and NOT NULL FK constraints
Goto Forum:
  


Current Time: Wed May 22 02:24:59 EDT 2013

Powered by FUDForum. Page generated in 0.01660 seconds