I mapped this entity in Hibernate 5
class A {
private String code;
private B child;
@LazyToOne(LazyToOneOption.PROXY)
@ManyToOne(fetch=FetchType.LAZY)
@NotFound(action=NotFoundAction.IGNORE)
@JoinColumns({...})
public B getChild() { ... }
}
And my query to load only A is:
from A where a.code like :q
With this configuration Hibernate makes a select on A and on B entities. I don't want it to load B but only A
What am I missing?