Bug 344 : Invalid table alias with orderBy clause referencing property on embedded bean
Priority 
High
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
2.7.2
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
09/12/2010
Updated 
09/12/2010
Type 
Bug
 
Attachments 
No attachments

The test case is the query:

Ebean.find(EEmbInner.class)
.fetch("outer")
.orderBy("outer.datePeriod.date1")
.findList();

With the resulting SQL:

select t0.id c0, t0.nome_inner c1, t0.update_count c2
, t1.id c3, t1.nome_outer c4, t1.update_count c5, t1.date1 c6, t1.date2 c7
from eemb_inner t0
left outer join eemb_outer t1 on t1.id = t0.outer_id
order by t2.date1

t2 is the incorrect table alias.

 
Rob 09 Dec 10:14
Fixed in HEAD

fixed in head

woResponse

Upload a file