Benjamin,

The base idea behind such data modeling to force business user to use the
category attribute based on category type. But it does not force at entity
level as such does not mean at all at db level.
IMO we can remove such relations from db layer as anyways we are going to
maintain such constraints on service layer only.

Alternatively, we should rethink on this type of modeling if we want to
maintain relationship somehow. In first look it seems that we should remove
such occurrences.

I would prefer to take others opinion on this, I may be wrong.


Rishi Solanki
Sr Manager, Enterprise Software Development
HotWax Systems Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxsystems.com
www.hotwax.co

On Thu, Apr 5, 2018 at 8:57 PM, Benjamin Jugl <benjamin.j...@ecomify.de>
wrote:

> Hi everyone,
>
> while I was working onJira Issue OFBIZ-10327 <
> https://issues.apache.org/jira/browse/OFBIZ-10327> and 10328 <
> https://issues.apache.org/jira/browse/OFBIZ-10328> I stumbled across the
> entity definition for ProductCategoryAttribute  (in
> /ofbiz/applications/datamodel/entitydef/product-entitymodel.xml).
>
> The last lines of the definition state:
>
>   <relation type="many" rel-entity-name="ProductCategoryTypeAttr">
>         <key-map field-name="attrName"/>
>   </relation>
>
> I am quite new to this, but I think this statement does not make sense.
> a) The primary key of ProductCategoryAttribute is composite. Just the
> field "attrName" does not suffice for a relation to another table, if I am
> not mistaken.
> b) I am not quite sure about the nature of a relation between
> CategoryAttribute and CategoryTypeAttribute.
>
> Does anyone have background knowledge to this and can perhaps explain or
> even verify that this is obsolete?
>
> Many thanks, yours Benjamin
>
>
>

Reply via email to