SQLQuery query = session.createSQLQuery("select {o.id} from order o " +
"LEFT JOIN bookings b ON b.id = o.bookingId " +
);
List pusList = query.addEntity(Order.class)
.list();
and in order class I have:
@OneToOne(cascade = CascadeType.ALL, mappedBy = "order", fetch = FetchType.LAZY)
private Trip trip;
but during execution i see: fist, main sql. and many-many queries like this: Hibernate: /* load Trip */ select......
How can I to denny fetching Trips?
Update: Trip is useless in this case. And better is don't fetch it.