class User(db.Model):
__tablename__ = 'tbl_user'
type = db.Column(db.String(32))
...
__mapper_args__ = {
'polymorphic_identity': 'user',
'polymorphic_on': type,
} # remove with_polymorphic
class Tourist(User):
__tablename__ = None # Add table name to be None
__mapper_args__ = {
'polymorphic_identity': 'tourist'
}
...
class Guide(User):
__tablename__ = None # Add table name to be None
__mapper_args__ = {
'polymorphic_identity': 'guide'
}
...