Serializing / deserializing active records with children

What is the best approach to serialize / deserialize full blown active
record objects with multiple child objects (one-to-many relations).

YAML::load(), YAML::dump() almost work :slight_smile: -> loaded object has
children (I see them in breakpoint session: “puts parent”), but when I
am accessing children (e.g: “puts parent.emails”) array becomes
cleared - I guess rails are trying to hit db to get children, but
those are only in yaml.

Perhaps there is somewhere method opposite to to_xml() ?

Thanks,
Szczepan