oftentimes I have this kind of usage scenario:
entity A is connected to B through a 1--1 relation,
in code, I often simply use A.* and A.getB().getId(), I never use any other properties of B(), since the Id of B is actually stored in table A already, I do not necessarily have to load the B table, but hibernate always creates a JOIN or latter SELECT when it sees getB(). this is a huge problem if B table is big, or it has its own associations
is there a way to optimize for this special use case?
Thanks Yang