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