On Monday, April 10, 2017 at 4:49:01 AM UTC-7, Scorpa wrote:
>
> Yes, that's what i'm trying to achive.
>
> For now i have three tables: ingredients, tags and data.
> Data table defined with - Field('ingredients', 'list:reference tag_ingr'),
>
>
> tags - db.define_table('tag_ingr',
>
> Field('name', type='string'),
> format='%(name)s')
>
>
> And ingredient table have link to tag - Field('tag_id', db.tag_ingr,
>
> label=T('tag id'))
>
>
> So i have table t_filter which havee list of references which is tags and
> now i'm trying to search throught it.
> When i'm searchig throught the tags, i'm trying to use 'belongs' but it
> gives zero results:
>
> db(db.t_filter.ingredients.belongs(ids).select()
>
>
> What is correct way to search throught list:reference ?
>
>
How are you setting "ids" in your belongs?
/dps
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.