Hi Antoine,
One other solution is to use ContentMetaData and MetaDataPredicate.
Create a MetaDataPredicateId corresponding to category and create
records with this predicate for each category you want to associate to
this content.
Pierre
On 24/06/2015 15:04, Antoine Ouvrard wrote:
Hello everyone,
I'm a newbie in the ofbiz world and I am so excited to take part in
its development!
Right now, I would like to add the category feature in the blog
component.
* First, I thought to use the DataCategory table like this:
Content (parent) (Blog) => Content (Article) => DataResource =>
DataCategory
But the problem of this solution is that it does not allow us to link
several categories per article.
* Second, I tryed with the ContentPurpose table
Content (parent) (Blog) => Content (Article) => ContentPurpose =>
ContentPurposeType
With a ContentPurposeType : BLOG_CATEGORY
But the problem of this is the primary key of ContentPurpose which is
composed of contentId and contentPurposeType, so we come back to the
same problem.
How do you think I should manage article categories within the blog?
Looking at the ofbiz data model, the solution might be to store the
categories in the ContentPurposeType table adding a "Parent" field
within the table.
What do you think and how would you make this?
Thanks,
Antoine O
--
logoNrd <http://nereide.fr/>
Pierre GAUDIN
Consultant Fonctionnel Apache-OFBiz, ERP en logiciel Libre
informat...@nereide.fr
3bis rue des Isles 37270 VERETZ
Std: 02 47 50 30 54 - mob: 06 08 40 25 70
ofbiz-fr <http://www.ofbiz-fr.org/> | réseau LE
<http://www.libre-entreprise.org/>