On 2007-12-13 09:10:40 -0800, Florian wrote:

> Does anybody could explain me how works select() or selectBy()
> with multi criteria ?
> 
> a piece of my controller :
> 
> images = Attachement.select( AND( Attachement.q.message == msg.id,
> Attachement.q.content_type.startswith( 'image' ) ) )

Off the top of my head, I think it should be: 

    images = Attachement.select( AND( Attachement.q.messageID == msg.id,
             Attachement.q.content_type.startswith( 'image' ) ) )


Ie, 'Attachement.q.messageID' rather than
'Attachement.q.message'. It's a quirk of how SQLObject names foreign
key attributes. 

-- 
anders pearson : http://www.columbia.edu/~anders/
   C C N M T L : http://www.ccnmtl.columbia.edu/
        weblog : http://thraxil.org/

Attachment: signature.asc
Description: Digital signature

Reply via email to