javax.persistence.PersistenceException: Query threw SQLException:Every derived table must have its own alias Bind values:[1, 1] Query was:select count(*) from ( select distinct t0.id c0 from o_order t0join o_order_detail u1 on u1.order_id = t0.id where t0.id > ? and u1.id > ? )
Fixed in HEAD.