2007/5/15, Oleg Broytmann <phd@...>:
> > And if so, is there another way to do this?
> Do it SQL-wise. Recreate and declare the intermediate table, and do a
Ok, I figured out the join I need to do, and I declared the intermediate
table like this:
keywords = RelatedJoin("Keyword",otherColumn="keyword_id",
keyword = StringCol(alternateID=True)
photos = RelatedJoin("Photo", joinColumn="keyword_id",
Is that correct? If so, how do I access the intermediateTable? Because:
>>> Photo.select(LEFTJOINOn(None,keyword_photo,Photo.id ==
Traceback (most recent call last):
File "<console>", line 1, in <module>
NameError: name 'keyword_photo' is not defined
> Another question bubbles up. Is there a way to create a dict out of a
> > SelectResult?
> Starting with 0.8 SQLObject.sqlmeta has a method .asDict().
> Or a JSONifiable object?
> No, that's completely outside of the scope of SQLObject.
I understand. I meant a simple object that I could pass to a function that
converts it to JSON. But asDict() does the trick. I should be mentioned in
the docs I think. Quite a valueable method..