Here is the data:
select * from FLIGHT
Here is the FlightNumber class:
It works great. But of course named query would be better:
First, the definition (in Flight.java class):
Unfortunately, I got IllegalArgumentException: Cannot create TypedQuery for query with more than one return.
Dommage. Changing from named query to embedded one didn't solve the problem.
Changed to EclipseLink 2.0.0 didn't solve the problem either. However, EclipseLink 2.1.0 did solve the problem.
After checking the JIRA Hibernate, the problem is already reported couple days ago: