got an entity with a few lazy collections in it.
also got a stateless session bean that uses this entity in an ejb method. the method does no changes to the entity, only reads the entity's data and returns it.
now if i use:
it turns out that sorting the collection returned from one of the entity's getters (using collections.sort) make hibernate think i changed the entity.
i cloned the collection before sorting and it is solved - no more update query when the transaction exits.