Share » Forums » Developer » store of cloned class fails in...

store of cloned class fails in transaction

store of cloned class fails in transaction

Tuesday 08 August 2006 1:29:12 am - 3 replies

Modified on Tuesday 08 August 2006 1:31:35 am by Stefano Guandalini

Author Message

Kristof Coomans

Tuesday 08 August 2006 1:51:12 am

Hello Stefano

Did you try to call the store method after cloning?

$new_class->store();

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Stefano Guandalini

Tuesday 08 August 2006 1:59:49 am

Yes. The sync() method calls the store() method only if there is "ditry" data. So the result is the same!

Stefano Guandalini
http://www.nizan.net

Kristof Coomans

Tuesday 08 August 2006 5:57:16 am

From kernel/class/copy.php:

$classCopy = $class->clone();
$classCopy->initializeCopy( $class );
$classCopy->setAttribute( 'version', 1 );
$classCopy->store();

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu