Editing Existing Class

Author Message

John Smith

Wednesday 17 January 2007 12:59:59 am

Hi there,

Hope someone can help me. I have a class called "article" with 7 attributes. Already created few objects of this class and now i want to add another couple of new attributes to the class.

Any suggestions what I can do so that old objects of the class get also effected with default values of the new attributes.

Cheers
Smith

Ɓukasz Serwatka

Thursday 18 January 2007 12:46:15 am

You will need to use a custom PHP script for this. Script will update all existing content objects with new attribute.

http://ez.no/community/contribs/hacks/update_class_from_command_line

Access to PHP command line is needed.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

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

eZ debug

Timing: Jan 19 2025 11:39:24
Script start
Timing: Jan 19 2025 11:39:24
Module start 'layout'
Timing: Jan 19 2025 11:39:24
Module start 'content'
Timing: Jan 19 2025 11:39:26
Module end 'content'
Timing: Jan 19 2025 11:39:26
Script end

Main resources:

Total runtime1.6751 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0090 589.0469152.6094
Module start 'layout' 0.00900.0050 741.656339.4141
Module start 'content' 0.01401.6595 781.0703524.1484
Module end 'content' 1.67350.0016 1,305.21888.3438
Script end 1.6751  1,313.5625 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.1944160.0002
Check MTime0.00140.0823160.0001
Mysql Total
Database connection0.00110.062810.0011
Mysqli_queries1.621696.8053540.0300
Looping result0.00060.0377520.0000
Template Total1.612796.320.8064
Template load0.00220.129520.0011
Template processing1.610596.144420.8053
Template load and register function0.00030.015710.0003
states
state_id_array0.00290.176010.0029
state_identifier_array0.00410.244320.0020
Override
Cache load0.00170.1038130.0001
Sytem overhead
Fetch class attribute can translate value0.00060.035120.0003
Fetch class attribute name0.00140.084330.0005
XML
Image XML parsing0.00090.053320.0004
class_abstraction
Instantiating content class attribute0.00000.000530.0000
General
dbfile0.00090.0558180.0001
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 9
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs