Removing a container node that have object-relations

Author Message

Nicolas R

Monday 09 March 2009 3:11:43 am

Hello,

I have nodes that have object-relations to other nodes. When removing those nodes, I would like that all attached nodes are removed too.
How can I do it ?
Thank you.

Jean-Yves Zinsou

Monday 09 March 2009 1:00:40 pm

Hi,
I would say that the only way of doing it is to make an extension with a custom removal module that takes care of fetching the related content and delete them..

I don't know if you are familiare with ezpublish extensions, but here is a good start guide :
http://ez.no/fr/developer/articles/an_introduction_to_developing_ez_publish_extensions

To use with :
http://pubsvn.ez.no/doxygen/4.0/html/

Hope this helps !
Jey

Do Androids Dream of Electric Sheep?
I dream of eZpubliSheep....
------------------------------------------------------------------------
http://www.alma.fr

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 31 2025 00:21:49
Script start
Timing: Jan 31 2025 00:21:49
Module start 'layout'
Timing: Jan 31 2025 00:21:49
Module start 'content'
Timing: Jan 31 2025 00:21:50
Module end 'content'
Timing: Jan 31 2025 00:21:50
Script end

Main resources:

Total runtime0.7406 sec
Peak memory usage8,192.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0078 588.2813151.2266
Module start 'layout' 0.00780.0043 739.5078220.7188
Module start 'content' 0.01210.7277 960.22664,431.3750
Module end 'content' 0.73980.0008 5,391.60167.8125
Script end 0.7406  5,399.4141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.5006160.0002
Check MTime0.00130.1759160.0001
Mysql Total
Database connection0.00220.296410.0022
Mysqli_queries0.654788.3938540.0121
Looping result0.00050.0627520.0000
Template Total0.659389.020.3296
Template load0.00210.284120.0011
Template processing0.657188.727420.3286
Template load and register function0.00130.174310.0013
states
state_id_array0.00130.169610.0013
state_identifier_array0.00120.166220.0006
Override
Cache load0.00170.2315170.0001
Sytem overhead
Fetch class attribute can translate value0.00190.252220.0009
Fetch class attribute name0.00200.270230.0007
XML
Image XML parsing0.00190.259120.0010
class_abstraction
Instantiating content class attribute0.00000.001030.0000
General
dbfile0.00300.4063160.0002
String conversion0.00000.001240.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
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/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: 16
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs