forked from rDrama/rDrama
dfs
parent
a6beef77df
commit
f81be32791
|
@ -15,8 +15,8 @@ class Vote(Base):
|
||||||
app_id = Column(Integer, ForeignKey("oauth_apps.id"))
|
app_id = Column(Integer, ForeignKey("oauth_apps.id"))
|
||||||
real = Column(Boolean, default=True)
|
real = Column(Boolean, default=True)
|
||||||
|
|
||||||
user = relationship("User", viewonly=True)
|
user = relationship("User", lazy="subquery", viewonly=True)
|
||||||
post = relationship("Submission", viewonly=True)
|
post = relationship("Submission", lazy="subquery", viewonly=True)
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
|
||||||
|
@ -56,8 +56,8 @@ class CommentVote(Base):
|
||||||
app_id = Column(Integer, ForeignKey("oauth_apps.id"))
|
app_id = Column(Integer, ForeignKey("oauth_apps.id"))
|
||||||
real = Column(Boolean, default=True)
|
real = Column(Boolean, default=True)
|
||||||
|
|
||||||
user = relationship("User")
|
user = relationship("User", lazy="subquery")
|
||||||
comment = relationship("Comment")
|
comment = relationship("Comment", lazy="subquery", viewonly=True)
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue