I'm getting frustrated with the list:string field type.

I store products, each product has "keywords" that describe the
product.
db.define_table('products',
   Field('keywords', 'list:string'))
I don't know what the keywords will be, so I can't use IS_IN_SET()

It seems to stores the keywords fine, as long as (I'm using Crud)
I separate the keywords like this: green|blue|red

But when I make this call
rows = db(db.products.keywords.contains(keyword)).select()
I don't get all the products back that I should! In fact, it seems
that I need to do an update on the product (again using Crud,
and any sort of update) before the product's keywords will be
picked up.

Is this a problem with using Crud?
In all honesty, I'd be more comfortable not using list:string, and
having a separate table "keywords" that linked (many-to-one)
to the products table, but I really don't know how I would even
begin to do that in web2py..

Thanks for reading!
- rick

Reply via email to