hi all,
I have a User object/mapping in my application. Each user has a list of contact information (phone, email etc)
the mapping for the user contains:
<bag name="ContactInfo" table="contact_info" lazy="true" cascade="all">
<key column="contact_id"/>
<one-to-many class="...ContactInfo, ..."/>
</bag>
this works fine but i get the n+1 select problem so i need to optimize it a little bit. But for some reason, when I change this to a join and perform some db operation, NH starts updating ALL contact_info objects in the database. When i say db operation i dont mean changinf a contact. i mean anything.
Anyone knows why? thx
EDIT: Just realized that it does it for lazy="true" as well but the second time, after the objects have been loaded. the question of why remains