Well, that didn't seem to work.
I guess the idea is that the Session knows that 2 instances of YourEntity that have the same id property ought to be equivalent?
That makes sense but it doesn't seem to work for me.
(when I try session.getIdentifier(anEntity) I *do* get a string that I recognize as being the ID for that entity)
It's just that when I make a new instance of YourEntity using the same ID for the one I just queried from the database, session.contains returns false.
could this have something to do with the way the id is defined in the .hbm document? (although it seems straight-forward enough to me):
Code:
<id name="itemID" type="string" column="itemID">
<meta attribute="scope-set">protected</meta>
<generator class="native"/>
</id>
Not sure what to try next. Any advice most welcome!
Havrilesky