Fix lazy.

This commit is contained in:
Alexis Lahouze 2015-06-05 18:07:21 +02:00
parent 35720dc3a5
commit cb8bf24bad
3 changed files with 4 additions and 4 deletions

View File

@ -30,8 +30,8 @@ class Entry(db.Model):
account_id = db.Column(db.Integer, db.ForeignKey('account.id')) account_id = db.Column(db.Integer, db.ForeignKey('account.id'))
scheduled_operation_id = db.Column(db.Integer, db.ForeignKey('scheduled_operation.id')) scheduled_operation_id = db.Column(db.Integer, db.ForeignKey('scheduled_operation.id'))
account = db.relationship(Account, backref = db.backref('entry', lazy="Dynamic")) account = db.relationship(Account, backref = db.backref('entry', lazy="dynamic"))
scheduled_operation = db.relationship(ScheduledOperation, backref = db.backref('entry', lazy="Dynamic")) scheduled_operation = db.relationship(ScheduledOperation, backref = db.backref('entry', lazy="dynamic"))
category = db.Column(db.String(100), nullable = True) category = db.Column(db.String(100), nullable = True)

View File

@ -32,7 +32,7 @@ class Operation(db.Model):
account_id = db.Column(db.Integer, db.ForeignKey('account.id')) account_id = db.Column(db.Integer, db.ForeignKey('account.id'))
scheduled_operation_id = db.Column(db.Integer, db.ForeignKey('scheduled_operation.id')) scheduled_operation_id = db.Column(db.Integer, db.ForeignKey('scheduled_operation.id'))
account = db.relationship(Account, backref = db.backref('operation', lazy="Dynamic")) account = db.relationship(Account, backref = db.backref('operation', lazy="dynamic"))
category = db.Column(db.String(100), nullable = True) category = db.Column(db.String(100), nullable = True)

View File

@ -14,7 +14,7 @@ class ScheduledOperation(db.Model):
value = db.Column(db.Numeric(15, 2), nullable = False) value = db.Column(db.Numeric(15, 2), nullable = False)
account_id = db.Column(db.Integer, db.ForeignKey('account.id')) account_id = db.Column(db.Integer, db.ForeignKey('account.id'))
account = db.relationship(Account, backref = db.backref('scheduled_operation', lazy="Dynamic")) account = db.relationship(Account, backref = db.backref('scheduled_operation', lazy="dynamic"))
category = db.Column(db.String(100), nullable = True) category = db.Column(db.String(100), nullable = True)