Changing an enum's value

Author Message

Rib Rdb

Sunday 01 June 2003 10:20:42 pm

Now that I created an enum value, I'm having problems trying to edit it. Here's the code I'm using:
$attribute = $dataMap['rating'];
$enum = $attribute->attribute('content');
$enumobjectList = $enum->attribute('enumobject_list');
$enumObjValue = $enumobjectList[0];
$enumObjValue->setAttribute('enumelement', $elements[$Rating]);
$enumObjValue->setAttribute('enumvalue',$values[$Rating]);
$enumObjValue->setAttribute('enumid',$ids[$Rating]);
$enumObjValue->store();

Instead of changing the existing value, it creates a new one. If I don't want to bother with versions (I don't care about the old value and don't need it cluttering the database) do I need to remove the old value and then create a new one?

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.