Hello,

When trying to add a new item doing:

session = session.add(mediaGroup)

I got this error:

Module sqlalchemy.orm.attributes:834 in get_collection
   return getattr(user_data, '_sa_adapter')
   class GenericBackrefExtension(interfaces.AttributeExtension):>>
return getattr(user_data, '_sa_adapter')

"AttributeError: 'list' object has no attribute '_sa_adapter'"

This object's class:

class ScreenGroup(rdb.Model):
        """The ScreenGroup is a class derived from ScreenGroup, it is used to
control users within a group"""
        rdb.metadata(metadata)
        rdb.tablename("screen_groups")

        id = Column("id", Integer, primary_key=True)
        title = Column("title", String(100))
        parents = Column("parents", String(512))

        screens = relationship("Screen", secondary=group_screens,
order_by="Screen.title", backref="screen_groups")
        screenGroups = relationship("ScreenGroup",
secondary=screen_group_groups, order_by="ScreenGroup.title",
                primaryjoin=lambda: ScreenGroup.id ==
screen_group_groups.c.screen_groupA_id,
                secondaryjoin=lambda: ScreenGroup.id ==
screen_group_groups.c.screen_groupB_id,
                backref="screen_groups")

Thanks in advance!

-- 
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