Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Deserialization support #33

Open
blakeman8192 opened this issue Nov 21, 2012 · 2 comments
Open

Deserialization support #33

blakeman8192 opened this issue Nov 21, 2012 · 2 comments

Comments

@blakeman8192
Copy link

It appears that dm-serializer can convert objects to xml/json/csv but not convert xml/json/csv back into objects. Often any time a program would want to serialize information into a database, it would at one point want to retrieve that same information. Why is dm-serializer part of a database project if it only accomplishes half of what a database does?

It seems more to be a simple serialization utility that can be used for a multitude of purposes... but not quite appropriate for database usage if it can't be used to retrieve information and only to store it. ActiveRecord has proper deserialization, so why can't DataMapper?

@muescha
Copy link

muescha commented Jun 7, 2014

+1

@dreamboostme
Copy link

If I understand this correctly. Use this temporary solution

p = Post.first()

# get json as Hash
myjson = p.as_json

# deserialization
p.attributes = myjson

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants