Beispiel #1
0
class OneUser(db.Model):
    class Meta:
        lazy_mapped = True

    name = db.Column(db.String)

    roles = db.relationship('OneRole', back_populates='user')
Beispiel #2
0
class OneRelationship(db.Model):
    class Meta:
        lazy_mapped = True

    name = db.Column(db.String)
    backrefs = db.relationship('OneBackref',
                               backref=db.backref('relationship'))
Beispiel #3
0
class OneRole(db.Model):
    class Meta:
        lazy_mapped = True

    name = db.Column(db.String)

    user_id = db.foreign_key('OneUser')
    user = db.relationship('OneUser', back_populates='roles')
Beispiel #4
0
class TwoBasic(db.Model):
    app = db.Column(db.String)
Beispiel #5
0
class OneBackref(db.Model):
    class Meta:
        lazy_mapped = True

    name = db.Column(db.String)
    relationship_id = db.foreign_key('OneRelationship')
Beispiel #6
0
class TwoBasic(db.Model):
    class Meta:
        lazy_mapped = True

    name = db.Column(db.String, index=True)
Beispiel #7
0
class OneBasic(BaseOneBasic):
    class Meta:
        lazy_mapped = True

    ext = db.Column(db.String)
Beispiel #8
0
class OneParent(db.Model):
    class Meta:
        lazy_mapped = True

    name = db.Column(db.String)