I have employees which have a many to one relation (foreign key) with addresses (they work on a same address or something).
I create 2 employees on 1 address, and save all 3.
I also have ehcache, and their properties go in there also.
In a new session I do a get on a employee by id. The properties of the employee are found in ehcache, but of the address is in ehcache only the id of the address.
Now hibernate creates a proxy to an address, with this id. Hibernate does not go to ehcache again to see if the (properties of the) address are there. This is what I don't understand.
Thanks.
|