I may be confusing the intended semantics, but it's based on
what the docs say. The API doc for Session.update(Object, Serializable)
states: "Update the persistent state associated with the given
identifier...." It's different for Session.update(Object) which
states: "Update the persistent instance with the identifier of the
given transient instance....." Also, the reference doc states:
"Immutable classes, mutable="false", may not be updated or
deleted by the application."
I'm more or less ambivalent about the behavior. I can preclude
access to the update in my app. I'm just pointing out what seems to
be an inconsistency.
thanks,
-r
p.s. I would just fix the doc and submit a patch, if I was sure about
what to write.
|