My db.py includes...

db.define_table('voucher',
    Field('code', 'string', length=128, unique=True, notnull=True,
required=True),
    ....

Locally on sqlite when I insert a second record with the same 'code'
as an existing record insert() throws an except. I catch the exception
and report back to the user.

Locally on dev_appserver the "duplicate" insert() successfully inserts
a duplicate record; no exception is thrown.

I've looked at the 2nd edition book and this group but can't find
anything that say that GAE doesn't support unqiue=True.

Can anyone clarify this use of unique=True on GAE?
And if it's not supported is there a recommended alternative approach?

Reply via email to