Tuesday 08 August 2006 1:29:12 am
Environment:
- Apache 1.3.33
- PHP 4.4.0
- PostgreSQL 8.0.3 (Linux distro Ubuntu 5.10) I'm cloning a class ti do some tricks in an automation script, but...
$new_class = $class->clone();
$new_class->setAttribute('name', $class->attribute('name').'2');
$new_class->setAttribute('identifier', $class->attribute('identifier').'2');
$new_class->sync();
fails on sync() call stating that a transaction failed (see log):
LOG: statement: BEGIN WORK
LOG: statement: SELECT id, version
FROM ezcontentclass
WHERE id='' AND version='0'
ERROR: invalid input syntax for integer: ""
LOG: statement: ROLLBACK WORK
$class is retrieved as follow:
$class = eZPersistentObject::fetchObject( eZContentclass::definition( ), null, array( 'id' => $classID ), true, null, null );
where $classID is the ID of an existing class. Ideas? Thanks g
Stefano Guandalini
http://www.nizan.net
|