I'm experimenting with a simple application using CMP2 with CMR fields. The application consists of 3 entity beans:
1. Role: has a name and two CMR fields, movie and actor. 2. Actor: has some cmp fields, and a CMR field (roles) which is a set of Role objects. 3. Movie: has some cmp fields and a CMR field (cast) which is a set of Roles.
I'm using commit option A.
The first time a movie is loaded (using findByName), and the method getCast() is called, there is a call to ejbLoad and ejbStore for each loaded bean. After this, there are calls to ejbStore on every bean every time the movie is reloaded, and a call to getCast() is performed. (This call happens inside a transaction)
Is this the expected behavior? Why is the ejbStore is being called even if no bean is modified?