On Wed, Nov 14, 2007 at 10:44:56PM +0100, Nicolas Riedel wrote:
> users = SQLRelatedJoin("User", intermediateTable="todo_user",
> joinColumn="todo_id", otherColumn="user_id")
> and then it should work?
Now t.users returns a SelectResult instance instead of a list of
Oleg Broytmann schrieb:
> On Wed, Nov 14, 2007 at 12:35:58AM +0100, Nicolas Riedel wrote:
>> Thanks for the quick answer, but that's not quite what I need. With this
>> way I can't neither use .reversed() nor do somthing like
>> .select(orderBy=xxx)
>
>You can do this by using SQLRealtedJoin (
On Wed, Nov 14, 2007 at 12:35:58AM +0100, Nicolas Riedel wrote:
> Thanks for the quick answer, but that's not quite what I need. With this
> way I can't neither use .reversed() nor do somthing like
> .select(orderBy=xxx)
You can do this by using SQLRealtedJoin (it returns SelectResult objects
i
Thanks for the quick answer, but that's not quite what I need. With this
way I can't neither use .reversed() nor do somthing like
.select(orderBy=xxx) nor select todos, that belong to user A and user B. :(
Oleg Broytmann schrieb:
> On Tue, Nov 13, 2007 at 11:43:59PM +0100, Nicolas Riedel wrote:
On Tue, Nov 13, 2007 at 11:43:59PM +0100, Nicolas Riedel wrote:
> u = User.get(1)
> todos = Todo.select(Todo.q.users == u)
You don't need the second line. User instances have all you want:
print u.todos
Oleg.
--
Oleg Broytmannhttp://phd.pp.ru/[EMA