##// END OF EJS Templates
db: don't use lazy loaders on PR related objects....
marcink -
r4507:fb547913 stable
parent child Browse files
Show More
@@ -3773,12 +3773,12 b' class ChangesetComment(Base, BaseModel):'
3773 resolved_comment = relationship('ChangesetComment', remote_side=comment_id, back_populates='resolved_by')
3773 resolved_comment = relationship('ChangesetComment', remote_side=comment_id, back_populates='resolved_by')
3774 resolved_by = relationship('ChangesetComment', back_populates='resolved_comment')
3774 resolved_by = relationship('ChangesetComment', back_populates='resolved_comment')
3775
3775
3776 author = relationship('User', lazy='joined')
3776 author = relationship('User', lazy='select')
3777 repo = relationship('Repository')
3777 repo = relationship('Repository')
3778 status_change = relationship('ChangesetStatus', cascade="all, delete-orphan", lazy='joined')
3778 status_change = relationship('ChangesetStatus', cascade="all, delete-orphan", lazy='select')
3779 pull_request = relationship('PullRequest', lazy='joined')
3779 pull_request = relationship('PullRequest', lazy='select')
3780 pull_request_version = relationship('PullRequestVersion')
3780 pull_request_version = relationship('PullRequestVersion', lazy='select')
3781 history = relationship('ChangesetCommentHistory', cascade='all, delete-orphan', lazy='joined', order_by='ChangesetCommentHistory.version')
3781 history = relationship('ChangesetCommentHistory', cascade='all, delete-orphan', lazy='select', order_by='ChangesetCommentHistory.version')
3782
3782
3783 @classmethod
3783 @classmethod
3784 def get_users(cls, revision=None, pull_request_id=None):
3784 def get_users(cls, revision=None, pull_request_id=None):
@@ -3983,10 +3983,10 b' class ChangesetStatus(Base, BaseModel):'
3983 version = Column('version', Integer(), nullable=False, default=0)
3983 version = Column('version', Integer(), nullable=False, default=0)
3984 pull_request_id = Column("pull_request_id", Integer(), ForeignKey('pull_requests.pull_request_id'), nullable=True)
3984 pull_request_id = Column("pull_request_id", Integer(), ForeignKey('pull_requests.pull_request_id'), nullable=True)
3985
3985
3986 author = relationship('User', lazy='joined')
3986 author = relationship('User', lazy='select')
3987 repo = relationship('Repository')
3987 repo = relationship('Repository', lazy='select')
3988 comment = relationship('ChangesetComment', lazy='joined')
3988 comment = relationship('ChangesetComment', lazy='select')
3989 pull_request = relationship('PullRequest', lazy='joined')
3989 pull_request = relationship('PullRequest', lazy='select')
3990
3990
3991 def __unicode__(self):
3991 def __unicode__(self):
3992 return u"<%s('%s[v%s]:%s')>" % (
3992 return u"<%s('%s[v%s]:%s')>" % (
General Comments 0
You need to be logged in to leave comments. Login now