You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Primary column name from the table must match the attribute name of the object model. Otherwise they will run into the following primary key error. Is this correct?
Column name of table: userid
User object attribute for primary key: id
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This line will see user.userid. When adding/saving objects into the database an attribute error will occur for whoosh.
Is there a way to specify the primary key or should migrate our tables to:
class User(db.Model):
id = Column('id'...
Thanks :)
The text was updated successfully, but these errors were encountered:
Primary column name from the table must match the attribute name of the object model. Otherwise they will run into the following primary key error. Is this correct?
Column name of table: userid
User object attribute for primary key: id
class User(db.Model):
id = Column('userid'...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This line will see user.userid. When adding/saving objects into the database an attribute error will occur for whoosh.
Is there a way to specify the primary key or should migrate our tables to:
class User(db.Model):
id = Column('id'...
Thanks :)
The text was updated successfully, but these errors were encountered: