Error: SAWarning: Warning: relationship 'staff_obj' on mapper
'Mapper|ProjectApp|PROJECT_APP' supersedes the same relationship on
inherited mapper 'Mapper|Application|APPLICATION'; this can cause
dependency issues during flush
self._check_conflicts()
Application is a parent class which can't have the attribute of
u_supervisor:
class Staff(mydb.Model):
__tablename__ = 'STAFF'
staff_id = mydb.Column(mydb.String(20), primary_key = True)
class Application(mydb.Model):
__tablename__ = 'APPLICATION'
app_id = mydb.Column(mydb.Integer, primary_key = True)
__mapper_args__ = {
'polymorphic_identity':'application',
'polymorphic_on':app_category
}
class ProjectApp(Application):
__tablename__ = 'PROJECT_APP'
app_id = mydb.Column(mydb.Integer, primary_key = True)
c_supervisor = mydb.Column(mydb.String(62),
mydb.ForeignKey('C_SUPERVISOR.c_sup_email'))
u_supervisor = mydb.Column(mydb.String(20),
mydb.ForeignKey('STAFF.staff_id'))
staff_obj = mydb.relationship('Staff', backref='projectapp_objs')
__mapper_args__ = {
'polymorphic_identity':'projApp',
}
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.