Yeah I know, gotta "love" Mondays... especially after a weekend spent over in Quebec :)
Here's one more thing I just did that may help. I replaced the map of UserContextProperties with the set of real UserContextProperty(name, value) POJO-s in UserSession. Basically, this time I have UserContextProperty.hbm.xml mapping and UserContextProperty.java POJO class and the set of them in UserSession.
<set name="userContextProperties" ....>
</set>
You know, the more common situation where both sides are mapped and pojo-ed, your school book parent-children example. And guess what, that extra update is gone now. I mean, mapping them as a set of POJO(name,value) objects is awkward and it is not a preferred solution. Original <map.../> was a natural solution to this. But why do I get the extra update with the <map.../> and not with the <set.../> that requires you to code more (hbm, class) I don't know.
It almost looks like Hibernate is being "paranoid" about the map of context properties ... and updates the UserSession... well just because... to be on the safe side, I don't know. Seriously though, I can't explain it.
Thanks.
Dan
|