Hi,
> I think it might be valuable, but I think in order for it to
> be accepted, I'd prefer it to be bi-directional.
Ok, how about add a to_json method to Entity?
Single parameter, "deep", which defaults to an empty dict, meaning
just the object is JSONified. If you specify keys in the dict, those
relations are included in the JSON output. And if you specify values,
those values are passed as the "deep" parameter when to_json is called
on the related objects.
Contact.get(3).to_json(deep={'phone':{}})
I'll have a go at producing a patch during the week.
Paul
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SQLElixir" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---