Forums / General / Related content type

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

eZ debug

Timing: Jan 19 2025 03:18:17
Script start
Timing: Jan 19 2025 03:18:17
Module start 'content'
Timing: Jan 19 2025 03:18:18
Module end 'content'
Timing: Jan 19 2025 03:18:18
Script end

Main resources:

Total runtime1.3714 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 588.8438180.8516
Module start 'content' 0.00651.1870 769.6953602.1016
Module end 'content' 1.19360.1777 1,371.7969337.3906
Script end 1.3713  1,709.1875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.3171210.0002
Check MTime0.00150.1082210.0001
Mysql Total
Database connection0.00070.052010.0007
Mysqli_queries1.285193.71242020.0064
Looping result0.00250.18182000.0000
Template Total1.336897.520.6684
Template load0.00220.157320.0011
Template processing1.334797.324120.6673
Template load and register function0.00020.015110.0002
states
state_id_array0.00120.090710.0012
state_identifier_array0.00230.165020.0011
Override
Cache load0.00190.1363390.0000
Sytem overhead
Fetch class attribute can translate value0.00160.115640.0004
Fetch class attribute name0.00150.107060.0002
XML
Image XML parsing0.00100.074040.0003
class_abstraction
Instantiating content class attribute0.00000.000960.0000
General
dbfile0.01070.7777270.0004
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs