Hi,
Unfortunately you're right...
That could be an evolution to support several values for the same
predicate id by adding the value in the primary key ?
Pierre
On 24/06/2015 17:44, Antoine Ouvrard wrote:
Hi Pierre,
Thank for details but for me this soluce is not possible because
primary key ContentMetaData is composed by contentId and
metaDataPredicateId.
Ok for one category but the second you will get an error "primarykey
already exist" on ContentMetaData table.
So how you add several categories?
Antoine
Le 24/06/2015 17:30, pierre.gaudin a écrit :
Hi Antoine,
No i really mean "BLOG_CATEGORY" as a new metaDataPredicateId.
For example, imagine you want to create a new blog entry and
associate it to the category "DAY_JOKE", you should create an new
record into ContentMetaData like this :
metaDataPredicateId = BLOG_CATEGORY
metaDataValue = DAY_JOKE
Pierre
On 24/06/2015 16:19, Antoine Ouvrard wrote:
Hi Pierre,
Forgive me, but I was talking about metaDataValue on ContentMetaData
table.
I think it's mandatory in case we want list all categories.
Every category will have a type "Blog_Category".
That's correct?
Regards
Antoine
Le 24/06/2015 15:54, pierre.gaudin a écrit :
Hi Antoine,
Yes, in field metaDataPredicateId.
Regards
Pierre
On 24/06/2015 15:39, Antoine Ouvrard wrote:
Ok, thank Pierre.
And I can put "BLOG_CATEGORY" on metaDataValue?
Antoine
Le 24/06/2015 15:17, pierre.gaudin a écrit :
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/>
--
logoNrd <http://nereide.fr/>
Antoine Ouvrard
informat...@nereide.fr
02 47 50 30 54
Ofbiz France <http://www.ofbiz-fr.org/> | Libre Entreprise
<http://www.libre-entreprise.org/>
--
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/>
--
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/>
--
logoNrd <http://nereide.fr/>
Antoine Ouvrard
informat...@nereide.fr
02 47 50 30 54
Ofbiz France <http://www.ofbiz-fr.org/> | Libre Entreprise
<http://www.libre-entreprise.org/>
--
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/>