You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Jacques Le Roux <ja...@les7arts.com> on 2009/08/18 12:30:32 UTC
Re: DB field name definition
Done http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices#OFBizContributorsBestPractices-NamingEntities
Jacques
From: "Ashish Vijaywargiya" <vi...@gmail.com>
> +1 on Jacques comment.
> And thanks a lot Rishi for such a nice explaination.
>
> --
> Ashish
>
> On Fri, May 29, 2009 at 6:48 PM, Jacques Le Roux <
> jacques.le.roux@les7arts.com> wrote:
>
>> Thanks Rishi,
>>
>> I don't know if there is already a such description in wiki, if not we may
>> add it in Contributor Best Practices...
>>
>> Jacques
>>
>> From: "Rishi Solanki" <ri...@gmail.com>
>>
>> Hi Ravi,
>>> Here are some rules or say patterns which are common for defining any
>>> entity.
>>> - Entity name must be in UpperCamelCase.
>>>
>>> - If entity name is abbreviation like Unit Od Measure (UOM) then treat
>>> it as one word and name is like Uom.
>>>
>>> - The Field name must be in lowerCamelCase and name should be self
>>> descriptive enough to show the purpose of the field.
>>>
>>> - If relation tag specify the relationship between two entities then the
>>> fk-name should contains the words
>>> from both entities separated by ("_") underscore.
>>>
>>> - If a entity relation with another entity defines more than one time
>>> then it should be differentiated by
>>> title attribute while defining a relation like "Form" or "To".
>>>
>>> - In the same if both field in the <key-map> tag are same then no need
>>> to specify rel-field-name.
>>>
>>> - In case of view entities the name will consists of name of all its
>>> member entities.
>>>
>>> - The <view-link> should be define for the proper view in the webtools.
>>> Apart from the above you can also refer to entitymodel.xsd for
>>> understanding
>>> the tags. And you can find several examples as given by Parimal is
>>> PostalAddress matches your requirement.
>>> Posted all the basic scenarios for defining the entity may I missed any,
>>> Hope the above notes helps you.
>>>
>>> --
>>> Rishi Solanki
>>> Enterprise Software Developer
>>> HotWax Media Pvt. Ltd.
>>>
>>>
>
Re: DB field name definition
Posted by Rishi Solanki <ri...@gmail.com>.
Thank you Jacques,
I go thru it, and try to edit the docs but I think do not have the
permission to edit others documentations.
Here are some more points and changes to do ;
- Change the Unit Od Measure --> Unit Of Measure.
- Entity name should not be more then 30 letters.
- Field name should not be more then 128 letters.
- fk-name should not be more then 18 letters.
I got these information from Ashish Vijaywargiya, and think the above points
should be added.
Rishi Solanki
Enterprise Software Developer
HotWax Media Pvt. Ltd.
On Tue, Aug 18, 2009 at 4:00 PM, Jacques Le Roux <
jacques.le.roux@les7arts.com> wrote:
> Done
> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices#OFBizContributorsBestPractices-NamingEntities
>
> Jacques
>
> From: "Ashish Vijaywargiya" <vi...@gmail.com>
>
> +1 on Jacques comment.
>> And thanks a lot Rishi for such a nice explaination.
>>
>> --
>> Ashish
>>
>> On Fri, May 29, 2009 at 6:48 PM, Jacques Le Roux <
>> jacques.le.roux@les7arts.com> wrote:
>>
>> Thanks Rishi,
>>>
>>> I don't know if there is already a such description in wiki, if not we
>>> may
>>> add it in Contributor Best Practices...
>>>
>>> Jacques
>>>
>>> From: "Rishi Solanki" <ri...@gmail.com>
>>>
>>> Hi Ravi,
>>>
>>>> Here are some rules or say patterns which are common for defining any
>>>> entity.
>>>> - Entity name must be in UpperCamelCase.
>>>>
>>>> - If entity name is abbreviation like Unit Od Measure (UOM) then treat
>>>> it as one word and name is like Uom.
>>>>
>>>> - The Field name must be in lowerCamelCase and name should be self
>>>> descriptive enough to show the purpose of the field.
>>>>
>>>> - If relation tag specify the relationship between two entities then
>>>> the
>>>> fk-name should contains the words
>>>> from both entities separated by ("_") underscore.
>>>>
>>>> - If a entity relation with another entity defines more than one time
>>>> then it should be differentiated by
>>>> title attribute while defining a relation like "Form" or "To".
>>>>
>>>> - In the same if both field in the <key-map> tag are same then no need
>>>> to specify rel-field-name.
>>>>
>>>> - In case of view entities the name will consists of name of all its
>>>> member entities.
>>>>
>>>> - The <view-link> should be define for the proper view in the webtools.
>>>> Apart from the above you can also refer to entitymodel.xsd for
>>>> understanding
>>>> the tags. And you can find several examples as given by Parimal is
>>>> PostalAddress matches your requirement.
>>>> Posted all the basic scenarios for defining the entity may I missed any,
>>>> Hope the above notes helps you.
>>>>
>>>> --
>>>> Rishi Solanki
>>>> Enterprise Software Developer
>>>> HotWax Media Pvt. Ltd.
>>>>
>>>>
>>>>
>>
>