You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Going straight from PORO to database-serialized form is hard to generalize, so I think we need an intermediate serialization layer, which will allow the serializer to be pulled out of the adapters and back into the core perpetuity gem. This intermediate form will expose all of the attributes stored in the source object so the adapter serializers won't need to dig into the user's POROs to snag instance variables and it'll help centralize all of the "what data are we storing" logic so we can start on #15.
This intermediate form could just be a hash (preferably a wrapped hash so we can give extra functionality to it if necessary), mapping the column name to the value, and the database adapter would do its serialization/sanitization based on that.
I doubt this will make it into the 1.0 release (which I'd like to do very soon), but maybe in 1.1.
The text was updated successfully, but these errors were encountered:
I'm a fan of subclassing Hash (or using Hashie) for as long as it makes sense. It's then very easy to migrate to a proper Object once it outgrows this stage (if indeed it does).
Going straight from PORO to database-serialized form is hard to generalize, so I think we need an intermediate serialization layer, which will allow the serializer to be pulled out of the adapters and back into the core
perpetuity
gem. This intermediate form will expose all of the attributes stored in the source object so the adapter serializers won't need to dig into the user's POROs to snag instance variables and it'll help centralize all of the "what data are we storing" logic so we can start on #15.This intermediate form could just be a hash (preferably a wrapped hash so we can give extra functionality to it if necessary), mapping the column name to the value, and the database adapter would do its serialization/sanitization based on that.
I doubt this will make it into the 1.0 release (which I'd like to do very soon), but maybe in 1.1.
The text was updated successfully, but these errors were encountered: