it just a bunch of ids that's taken from URI. So it's list of id like [1L,2L,3L] and so on.
It's working when i'm searching throught table, for example db(db.t_filter.id.belongs(ids)).select() But wont work with list:reference. can i fix it somehow ? понедельник, 10 апреля 2017 г., 21:11:49 UTC+3 пользователь Dave S написал: > > > > 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.