Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321770 - Can't define JPA @OrderBy annotation without specifying the column name
Summary: Can't define JPA @OrderBy annotation without specifying the column name
Status: RESOLVED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: Teneo (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Martin Taal CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-04 14:17 EDT by Ed Peters CLA
Modified: 2011-02-16 11:44 EST (History)
1 user (show)

See Also:


Attachments
XSD used to reproduce (1.19 KB, application/octet-stream)
2010-08-04 14:18 EDT, Ed Peters CLA
no flags Details
Stack trace from Hibernate (3.78 KB, text/plain)
2010-08-04 14:18 EDT, Ed Peters CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Peters CLA 2010-08-04 14:17:38 EDT
Build Identifier: 1.1.2-v201007191154

JPA assumes that if you use the @OrderBy annotation without specifying column(s) to order on, an associated list should be ordered by primary key.  However, when I try to create a data store using the attached XSD, I get an NPE; it looks like it's still trying to figure out which column to use.  (There is a test case for this in the Appian/Teneo repository on Assembla.)

Reproducible: Always

Steps to Reproduce:
1. create a data store with the attached XSD
2. check out the NPE you get as a result
Comment 1 Ed Peters CLA 2010-08-04 14:18:05 EDT
Created attachment 175863 [details]
XSD used to reproduce
Comment 2 Ed Peters CLA 2010-08-04 14:18:44 EDT
Created attachment 175864 [details]
Stack trace from Hibernate
Comment 3 Martin Taal CLA 2010-08-18 09:48:47 EDT
Fix committed to cvs, will be in the next build
Comment 4 Martin Taal CLA 2010-08-18 10:22:47 EDT
Fix is available in build of today on interim update site:
http://download.eclipse.org/modeling/emf/teneo/updates/1.2.0/interim/