Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 321770

Summary: Can't define JPA @OrderBy annotation without specifying the column name
Product: [Modeling] EMF Reporter: Ed Peters <ed.peters>
Component: TeneoAssignee: Martin Taal <mtaal>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: d.nikita.e
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
XSD used to reproduce
none
Stack trace from Hibernate none

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/