I get a duplicate entry error on an update_or_insert. First record with
category_id=1 is inserted fine. Second record with category_id=2 fails
saying"Duplicate entry '0-1' for key 'PRIMARY'"
Model:
web.define_table('category_description',
Field('category_id', 'integer', notnull=True, writable=False),
Field('language_id', 'integer', notnull=True, writable=False,
default=1),
Field('name', 'text', length=255, notnull=True),
Field('description', 'text', length=65535, notnull=True),
primarykey=['category_id', 'language_id'])
Controllert:
wd=web.category_description
wd.update_or_insert(wd.category_id==category.webid,
name=category.name,
description=category.description)
--