Related content type

Author Message

Fabio Carissimi

Wednesday 12 April 2006 3:26:57 am

Hello,

I am going to create custom content types for my EzPublish site and these content types are related together.
If I had to do it with a database, I would have used a table for each content type and foreign keys or relation tables ...

But in the object model of eZPublish, it must be different.

For exemple, If use the 'article' 'content type' and create a type which is a presentation of a division
of my company.
The division 1 has articles related with and the division 2 has other articles related to.
But sometimes, an article can be related to many different divisions.

I think I can use related_objects and related_objects_list.

Am I in the right way ?

Are there some limitations I have to know ?

Does somebody knows a tutorial which explain how to create content types and relations starting from
a generic data model (like UML ...) ?

Many thanks for help

Fabio Carissimi

Thursday 20 April 2006 1:42:02 am

Hello,

nobody uses related_objects ?
is it deprecated ?

I would appreciate if somebody give me an advice on how to use related_objects and related_objects_list

Many thanks for help

Kristof Coomans

Thursday 20 April 2006 2:18:54 am

Take a look at the documentation, especially
http://ez.no/doc/ez_publish/technical_manual/3_6/concepts_and_basics/content_management/object_relations

http://ez.no/doc/ez_publish/technical_manual/3_6/reference/datatypes/object_relation
http://ez.no/doc/ez_publish/technical_manual/3_6/reference/datatypes/object_relations

http://ez.no/doc/ez_publish/user_manual/3_6/the_administration_interface/the_object_edit_interface/related_objects

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

Fabio Carissimi

Wednesday 26 April 2006 6:18:15 am

Thanks, but before sending this post, i have read the documentation about related objects.

What I want is an advice from people who used to work with relationnal model and now uses EzPublish (object model).

I want somebody to tell me about his experience about doing this and
tell me the pro and cons of using related objects for such content modelling.

Thanks for help ...

Gabriel Ambuehl

Wednesday 26 April 2006 11:49:11 am

Essentially, the relations objects are implemented as a 1 to n relation table (linking objects). By my feeling it should not pose a bottlneck (those are found in other places much more likely). The general way how ez stores objects however means that you can't just simply run SQL queries with fieldnames etc like in normal relational database models. That's the price we pay for very flexible and quick implementation of content objects, really (if this is a deal breaker, ez is NOT for you). To be fair, these days there are several extensions that can export objects of a given content type to CSV at least.

Shameless plug: Do take a look at http://triligon.org/triligon/projects/enhancedobjectrelation which is usign the standard object relation infrastructure but adds a few more neat features.

Visit http://triligon.org

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 18 2025 11:22:46
Script start
Timing: Jan 18 2025 11:22:46
Module start 'layout'
Timing: Jan 18 2025 11:22:46
Module start 'content'
Timing: Jan 18 2025 11:22:47
Module end 'content'
Timing: Jan 18 2025 11:22:47
Script end

Main resources:

Total runtime1.4138 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0081 587.7891152.6094
Module start 'layout' 0.00810.0045 740.398439.4297
Module start 'content' 0.01261.3993 779.8281597.0391
Module end 'content' 1.41190.0018 1,376.867212.1875
Script end 1.4137  1,389.0547 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.2885160.0003
Check MTime0.00190.1366160.0001
Mysql Total
Database connection0.00140.100710.0014
Mysqli_queries1.345495.1650650.0207
Looping result0.00080.0596630.0000
Template Total1.367096.720.6835
Template load0.00260.181120.0013
Template processing1.364596.512920.6822
Template load and register function0.00020.016310.0002
states
state_id_array0.00130.091710.0013
state_identifier_array0.00190.134020.0009
Override
Cache load0.00200.1443390.0001
Sytem overhead
Fetch class attribute can translate value0.00080.053430.0003
Fetch class attribute name0.00140.096760.0002
XML
Image XML parsing0.00260.183930.0009
class_abstraction
Instantiating content class attribute0.00000.001060.0000
General
dbfile0.00180.1302160.0001
String conversion0.00000.000740.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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/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: 26
 Number of unique templates used: 6

Time used to render debug report: 0.0004 secs