mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Fix for #157 - Regression for @OrderBy on a @ManyToMany property due to change from issue 154
This commit is contained in:
@@ -153,8 +153,9 @@ public class BeanPropertyAssocMany<T> extends BeanPropertyAssoc<T> {
|
||||
if (i > 0) {
|
||||
sb.append(", ");
|
||||
}
|
||||
// these fkcolumns always on base table hence t0 as alias
|
||||
sb.append("t0.").append(exportedProperties[i].getForeignDbColumn());
|
||||
// these fk columns are either on the intersection (int_) or base table (t0)
|
||||
String fkTableAlias = isManyToMany() ? "int_" : "t0";
|
||||
sb.append(fkTableAlias).append(".").append(exportedProperties[i].getForeignDbColumn());
|
||||
}
|
||||
if (fetchOrderBy != null) {
|
||||
sb.append(", ").append(fetchOrderBy);
|
||||
|
||||
Reference in New Issue
Block a user