Good point. I have a possible fix to trunk, please check if it
resolves the problem.

On Dec 8, 8:11 am, Daniel Blomqvist <dan...@emediate.se> wrote:
> Hello, I tried making a query like this:
>
> db(db.table.field.contains(1)).select()
>
> where the field is a SQLCustomType with type 'list:integer' and native
> 'int(11)'
>
> The query does not work because of this function in gluon.dal.SQLCustomType:
>
> def startswith(self, dummy=None):
>          return False
> Why does this always return false?
> I get this exception from gluon.dal.Expression in the contains function:
>
> if not self.type in ('string', 'text') and not
> *self.type.startswith('list:')*:
>              raise SyntaxError, "contains used with incompatible field type"
>
> Am i missing something? Is this not supposed to be allowed?

Reply via email to