[Zope] Error trapping Duplicate entry in a database

Andreas Jung lists at zopyx.com
Wed Feb 14 13:45:33 EST 2007



--On 14. Februar 2007 18:40:25 +0000 larrymcdonnell at att.net wrote:

> Hi,
>
> I am trying to find a friendlier way of error traping when I am perform
> some database activities.

try..except?

> The one I am looking for first is checking for
> a duplicate entry in a database.

What does that mean? You want to check for an existing object by id within 
a container?

if some_id in somefolder.objectIds():
....

-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20070214/0d88776e/attachment.bin


More information about the Zope mailing list