On 12 January 2012 21:04, Philipp Kursawe <[email protected]> wrote:
> Since I cannot get the Binary property to work with dm-Migrations and
> sqlite3 I would like to save my object as base64 encoded string into
> the database.
>
> How would I do that so that the models property named "lis" is encoded
> as Base64 on assignment and decoded from Base64 when its loaded?
> Would I have to implement my own property or can this be done entirely
> in the model itself?
>
> Thanks,
> Phil

If you see my reply to your previous thread, you'll see you can
actually create a binary column quite easily via migrations.  But that
being said, if you did want to encode/decode to base64, I would
suggest doing the conversion in a custom type.  That way, the code
would be more reusable to future projects.  It's also probably easier,
but it could be done purely in the model by overriding the accessors
for the property in question

Regards
Jonathan

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" 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/datamapper?hl=en.

Reply via email to