Caused by: org.h2.jdbc.JdbcSQLException: Order by expression "B1_.CODE" must be in the result list in this case; SQL statement: select distinct this_.b_id as y0_ from A this_ left outer join B b1_ on this_.b_id=b1_.id order by b1_.code asc [90068-190]