-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skipping One Side of Bidrectional Links / Collection Handling #2
Comments
From [email protected] on April 01, 2010 05:46:38 I forgot to include two files in the patch. Additionally skipping of back references Attachment: backreferences-collections.patch |
From [email protected] on April 12, 2010 19:15:58 Thanks for the patch! I see the need to use methods to manipulate a collection, thanks! The "skip collection backreferences" setting skips the references in the list of the Status: Accepted |
From [email protected] on May 14, 2010 00:58:29 The skipping if meant to be used for bidirectional links which are really common if Example: You have an object Invoice that has a List. Every LineItem When serializing without reducing the backreferences you get an aweful lot of anchors Invoice &1:
when skipping it becomes Invoice:
which can be deserialized to the same object graph. I agree that it tis a special case and being a general purpose library you should |
From [email protected] on May 14, 2010 01:01:15 Just as a addendum: I meant property names broadly, as in private fields or JavaBean |
From [email protected] on March 30, 2010 09:35:59
I intend to use YamlBeans to automate data provisioning for integration
tests. The objects to be (de-)serialized are normally retrieved from a
database and often have bidirectional links:
Parent:
Child:
Since fixing the serialization of cyclic references this structure can be
serialized however it is heavily anchored without any real need.
Secondly, current deserialization code assumes that collections can be just
created, added to and assigned to the object being deserialized. In my case
collections are normally read-only and can be only worked on using specific
addTo_, removeFrom_ methods (also making it easier to track changes).
The attached patch does two things:
backreferences
(CollectionDeserializer)
It also includes new unit tests for the mentioned use cases...
Attachment: backreferences-collections.patch
Original issue: http://code.google.com/p/yamlbeans/issues/detail?id=2
The text was updated successfully, but these errors were encountered: