Hi,

I am looking for a way to store a non-sqlalchemy aware object in the
database, something like this:

class Foo(object):
    def __init__(self, name):
        self.__name = name
        self.__map   = {}

    def set_name(self, name):
        self.__name = name

    def get_name(self):
        return self.__name

    def set(self, key, value):
        self.__map[key] = value

    def get(self, key):
        return self.__map.get(key)

I tried to set up a mapper, but the object in question does not allow
direct attribute access, only through getters/setters (third party
library).

Is there a way to store such an object? I only need the object to be
saved explicitly whenever "session.save(foo)" is called.

-Samuel

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to