On 16 February 2011 17:05, Oleg Broytman <p...@phdru.name> wrote:
>   If SVNDocument is actually Document in this example, and type to
> filter must be compared equal to DocumentType.dbType

Ah yes, sorry about those errors.

>    docs.filter(
>        (Document.q.dbDocumentTypeID==DocumentType.q.id) &
>        (DocumentType.q.dbType==type)
>    )

I still can't get this to work — even if I set "type" to something
that doesn't match anything in the table, the filter has no effect —
the count of results is the same before and after, when I'd expect it
to be zero for a type not in the table. (I've checked that it goes
through that "if", too.)

I also changed the dbDocumentTypeID to dbDocumentType with no luck
(what's the difference between the two? I notice the same naming
change in the j-magic section of the docs).

One of the other things I tried is to use a j-magic expression:
Document.j.dbDocumentType & (DocumentType.q.dbType==type) ... but
still nothing happens to the select result. I've been trying to
construct an "IN" query, but haven't really gotten anywhere with that
yet either.

Any other suggestions?

Cheers,
Jason

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to