From c213aa63c689e52a29342fa3662c34427cdc755e Mon Sep 17 00:00:00 2001 From: Eevee Date: Sat, 25 Sep 2010 21:52:46 -0700 Subject: [PATCH] Make Post.author an innerjoin. --- splinext/forum/model/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/splinext/forum/model/__init__.py b/splinext/forum/model/__init__.py index c913561..b8f9225 100644 --- a/splinext/forum/model/__init__.py +++ b/splinext/forum/model/__init__.py @@ -87,4 +87,4 @@ Thread.first_post = relation(Post, primaryjoin=and_(Post.thread_id == Thread.id, # XXX THIS WILL NEED TO CHANGE when posts can be deleted! Or change what 'position' means Thread.last_post = relation(Post, primaryjoin=and_(Post.thread_id == Thread.id, Post.position == Thread.post_count), foreign_keys=[Post.thread_id], innerjoin=True, uselist=False, viewonly=True) -Post.author = relation(users_model.User, backref='posts') +Post.author = relation(users_model.User, backref='posts', innerjoin=True) -- 2.7.4