On May 10, 2014, at 10:49 PM, Alexander Luksidadi 
<alexander.luksid...@gmail.com> wrote:

> 
> Hi guys, i cant seem to find out whats causing this.
> 
> first, here are my classes:
> 
> class User(Base):
>     __tablename__ = "users"
>     id = Column(GUID, primary_key=True, default=uuid.uuid4())
>     ....
>     
>     permissions = ("Permission", secondary=UserPermission.__table__)
> 
> class Permission(Base):
>     __tablename__ = "permissions"
>     id = Column(GUID, primary_key=True, default=uuid.uuid4())
>     ....
> 
> class UserPermission(Base):
>     __tablename__ = "user_permissions"
>     id = Column(GUID, primary_key=True, default=uuid.uuid4())
>     user_id = Column(GUID, ForeignKey('users.id'), nullable=False)
>     permission_id = Column(GUID, ForeignKey('permissions.id'), nullable=False)

"default" on Column should point to a function that can be called.   Not a 
completed UUID value.  So "default=uuid.uuid4".


-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to