Does anyone have any ideas on this?

Does declarative simply not support the deferred property?

-Allen

On Sat, Nov 8, 2008 at 11:32 AM, Allen Bierbaum <[EMAIL PROTECTED]> wrote:
> We have been using the declarative successfully in our codebase for a
> couple months now with 0.4.x, but we have just run into a problem.
>
> We have a table we we want to map using declarative but we want to
> have one of the columns be deferred because it contains binary data.
> Unfortunately we can't figure out how to do this.
>
> We tried something like this:
>
> class Person(Base):
>    __tablename__ = 'people'
>    id = Column('id', Integer, primary_key=True)
>    data = Column('data', Binary)
>    __mapper_args__ = {'properties' : {'data' : sa.orm.deferred(data)}
>
> The problem is that when the declarative metaclass assembles the
> arguments to pass to the mapper creation method, this causes two
> arguments of name 'properties' to be passed into the call.  (see
> DeclarativeMeta.__init__)
>
> - Is this a bug in the implementation of declarative?  (perhaps the
> code in DeclarativeMeta.__init__ should look for
> __mapper_args__['properties'] and merge it with the internally created
> properties)
> - Or is there some other way to use deferred columns with declarative?
>
> Thanks,
> Allen
>

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

Reply via email to