Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-dev] Query results

I am working a few bugs related to what is returned from queries and native queries, and working on a hint to define this as well.

(bugs 229627 243205).

 

Currently EclipseLink returns the following for getSingleResult() (for getResultList() it returns a List of the value):

JPQL

- Select e from Employee e -> Employee

- Select e.id, e.name from Employee e -> Object[Integer, String]

- Select e.id from Employee e -> Integer

SQL

- SELECT EMP_ID, F_NAME FROM EMPLOYEE -> Vector[BigDecimal, String]

- SELECT EMP_ID FROM EMPLOYEE -> Vector[BigDecimal]

 

From the spec and users it seems we should return,

SQL

- SELECT EMP_ID, F_NAME FROM EMPLOYEE -> Object[BigDecimal, String]

- SELECT EMP_ID FROM EMPLOYEE -> BigDecimal

 

Does this seem correct?

 

However, unlike JPQL, with native queries we don't know ahead of time, what we will get back, so this is a little more tricky.

 


Back to the top