That is correct. However, I think I did not explain my "problem" appropriately enough for you to understand me.
Let me try with a rudimentary example. For example, class A has a many-to-one relationship to B. When A is loaded to client tier, B, from many-to-one relationship, is fetched as well. Client edits A but is not allowed to alter relationship to B. Now when A is to be reattached back to server, in the process of serialization over the wire B gets serialized as well since it is reachable from reference A.
Now, the question. How can I avoid serialization of B and yet retain hibernate in belief that A's many-to-one relationship to B did not change.
In your previous answer, did you mean to say that when I set cascade="none" for A's many-to-one relationship to B , I can simply set a reference to B in A to null and serialize back to server? Or something else?
Hope I am making more sense this time.
All the best,
Vladimir
|