Hi,
I have a bidirectional many to one relation from A to B. In the mapping I use a bag for the B side of the association mapped with lazy="false" and inverse="true". Inside the bag mapping I have a <cache usage="read-write"/> to enable caching of the collection:
Now, when I retrieve the B side of the association from the database (cache miss) everything is ok and B's collection of A's is initialized successfully. When I do it a second time, and get a cache hit, the collection is empty.
Any ideas what this could be? Are there any specific additional rules that come into play when caching is enabled?
Cheers
Erik
|