SQLQuery - Allow Subqueries as Join-Table

27 views
Skip to first unread message

Stefan

unread,
Dec 2, 2013, 8:40:03 AM12/2/13
to silverst...@googlegroups.com
Hi,

it would be nice to be able to add subqueries as joins to a DataList for example.
At the moment the SQLQuery's sql() method quotes the table name which would contain the sql for the subquery. I think this could be extended quickly, what do you mean?

We have to extend the search form of the ModelAdmin with an additional search query and didn't find a way to join this resulting table with the DataList returned by getList().
Our current fix is to add a "... IN ( $subQuery )". In our case that works, but there could be more complex cases where one has to access more fields of this temporary table.

Thanks

Stefan
Reply all
Reply to author
Forward
0 new messages