| Well that's probably because of your mapping and hibernate not being smart enough about the expression. If you map the ids as normal fields in PotDates and use these directly, Hibernate should be able to avoid the join. The problem is that you currently have to write this long expression to reference the actual id columns. Apparently hibernate doesn't recognize that accessing the columns doesn't require joining in case of deeper expressions. Simple expressions like pb.potDates.id on the other hand work. |