dc: I open two session ,one use query.list to get a collection and the 2cd session use query.iterator get the 'id' collection on the basis of document(note:the entity set the version column), when my first session update something and saved I use 2cd session iterator to get the entity data ,when first session saved the entity data have been changed but the 2cd session's iterator get the entity is the previous and the SQL has been sent. I want to know the database has been changed and hibernate tell us the iterator method only return the collections id,why i use the id get one entity is not currently?
|