Cameron Wallace McKenzie wrote:Indeed, this shouldn't be happening.
My first question is 'how do you know you are getting all entities of type B?' What's your proof?
How you know you have a good proof?
-Cameron McKenzie
ok i step through my code using the debugger when i get to the code where on the entitymanager the query "from A" is executed.. i see in my console (hybernate sql debug logging enabled) hundreds of queries flying by for entity B with a reference of PK of entity A.. this sql statements for entity B keep flying by in the console until a timeout occurs ... (so i dont get my entity A at all)
(btw database contains like 3000 of entity A and about 3000 of entity B)
i dont know why entity B is fetched (and i dont need them fetched).. the query on the entitymangager, is like above, plain and simple... the query is not the problem
so i think it has to do with the definition of the entity A or the definition of entity B
but would not know what the problem could be because like i said both are just @OneToOne with fetchtyp lazy...
and i checked for other references from one to the other but cant find any..