#526 - findPagedList with @EmbeddedId broken - automatically adds orderby t0.null

This commit is contained in:
Robin Bygrave
2016-01-13 10:43:56 +13:00
parent 55493c5b7d
commit 0453892ebd
2 changed files with 15 additions and 1 deletions
@@ -2316,7 +2316,7 @@ public class BeanDescriptor<T> implements MetaBeanInfo, SpiBeanType<T> {
*/
public void appendOrderById(SpiQuery<T> query) {
if (idProperty != null) {
if (idProperty != null && !idProperty.isEmbedded()) {
OrderBy<T> orderBy = query.getOrderBy();
if (orderBy == null || orderBy.isEmpty()) {
query.order().asc(idProperty.getName());