[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Dolibarr-dev] Question about dictionnary => id versus code

From: Maxime Kohlhaas
Subject: Re: [Dolibarr-dev] Question about dictionnary => id versus code
Date: Fri, 24 Oct 2014 14:19:05 +0200

My opinion is to always use rowid column as foreign key named fk_xxx. Code column seems to me to be an old way of doing it.

Bien cordialement,

Maxime Kohlhaas
Consultant associé
ATM Consulting
+33 6 33 42 92 43

ATM Consulting
Technosite Valence-Agglo
26 rue Barthélémy de Laffemas
26000 Valence

2014-10-24 14:13 GMT+02:00 Florian HENRY <address@hidden>:
Hello all,
    I wondering something about best practice with dictionnary dolibarr implementation.

    I take two exemple about thirdparty.
    llx_societe.fk_prospectlevel : a foreign key  on llx_c_prospectlevel.code
        The dictionnay llx_c_prospectlevel don't have rowid column

    llx_societe.fk_typent => a foreign key on
        The dictionnary  llx_c_typent have a id column (should be renamed into rowid by the way) but also get a code column

    What is the best strategy, to your mind, with dictionnary :

        1 :
            llx_dictionnary_1 (rowid,code,label,active)
            llx_table.fk_dict1 => llx_dictionnary_1.rowid

        2 :
            llx_dictionnary_1 (rowid,code,label,active)
            llx_table.fk_dict1 => llx_dictionnary_1.code

For me the best option is 1 but in this case what is the purpose of a "code" column ?


Florian Henry
+33 6 03 76 48 07
Twitter : @_Open_Concept_
Google+ :

Dolibarr-dev mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]