Solved it. I'm using grok as CMS and didn't realize I have to "grok"
every component every time when I use it. That's why I got that error.

Thanks anyway!

On Aug 4, 4:27 pm, Alvaro Reinoso <alvrein...@gmail.com> wrote:
> Hello,
>
> I got this error when I've tried to relate some classes:
>
> "UnmappedClassError: Class 'zeppelinlib.user.UserTest.User' is not
> mapped"
>
> I don't get errors when I have relation many-to-many.
>
> This is my file where I store all the User classes.
>
>     user_channels = Table(
>                         "user_channels",
>                         metadata,
>                         Column("user_id", Integer, ForeignKey("users.id")),
>                         Column("channel_id", Integer, ForeignKey(Channel.id))
>                 )
>
>     group_permissions = Table(
>                                 "group_permissions",
>                                 metadata,
>                                 Column("group_id", Integer, 
> ForeignKey("user_groups.id")),
>                                 Column("permission_id", Integer, 
> ForeignKey(Permission.id))
>                         )
>
>     class User(rdb.Model):
>         """Represents the user"""
>         rdb.metadata(metadata)
>         rdb.tablename("users")
>
>         id = Column("id", Integer, primary_key=True)
>         name = Column("name", String(50))
>         email = Column("email", String(50))
>         group_id = Column("group_id", Integer, ForeignKey("user_groups.id"))
>
>         channels = relation(Channel, secondary=user_channels,
> backref="channels")
>
>     class UserGroup(rdb.Model):
>         """Represents a group of users with the same features"""
>         rdb.metadata(metadata)
>         rdb.tablename("user_groups")
>
>         id = Column("id", Integer, primary_key=True)
>         title = Column("title", String(50))
>
>         users = relation(User, backref="users")
>         permissions = relation(Permission, secondary=group_permissions,
> backref="permissions")
>
> How can I solve it?
>
> 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