#1132 unconfirmed

[dm-serializers] better support for deep object tree

Reported by kristian | November 23rd, 2009 @ 07:16 AM

the to_xml can pass in two options :collection_element_name or :element_name whether it is a collection or a single resource. but with this it is very difficult to just change the "storage name". this gist illustrate it: http://gist.github.com/241055

so I think the better way to do define the element name would be using the storage name of resource. the default naming convention for table names are perfect XML element names !!

the patch also includes an issue when I have something like this:

class Child
include DataMapper::Resource

belongs_to :mother, :model => Child belongs_to :father, :model => Child end

then child.to_xml(:methods => [:mother, :father]) should produce following xml

currently I get

the last issue I came across was that a property value was frozen and that produces stacktrace in one of the xml serializiers.

so I just want to share my current fork od dm-serializer and if the patches are going to be included then I can add a few more specs for the changes.

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket