[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Dolibarr-dev] Fighting the db name change
From: |
Florian HENRY |
Subject: |
Re: [Dolibarr-dev] Fighting the db name change |
Date: |
Sat, 24 Oct 2015 10:29:25 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
Hello all,
It is a good point to introduce a dictionary structure into
Dolibarr, but I feel a different and more global way.
I will prefer get this informations from tables rather than in a PHP
file. Table "Object" with field "Class name","Class path", .... a table
"Object_field" with field "name", "type","table_FK", "etc...", " as it
is done more or less into object_extrafields table.
An auto-descritif table models will be a very nice improvement and
open gate to lot's of time reduction in dev.
Why store this into database rather than PHP file ? Because tomorrow
Python application can read object structure from DB, not from PHP file.
Anyway, it is a good at least a good start, and as Laurent says
"step by step".
Regards
Florian Henry
+33 6 03 76 48 07
address@hidden
http://www.open-concept.pro
Twitter : @_Open_Concept_
Google+ : https://www.google.com/+Open-conceptPro
Le 23/10/2015 21:36, Frédéric FRANCE a écrit :
> Hi all
> I have posted thid PR: https://github.com/Dolibarr/dolibarr/pull/3796
> Including this in external modules may help to fight the db name
> change(or triggers) and to reduce anxiolitic eating for developpers
> you can do
> $sql = "SELECT * FROM ".MAIN_DB_PREFIX.TABLE_THIRDPARTY;
> $sql .= " WHERE ".THIRDPARTY_FK_SOC." = ".$object->id;
> in place of knowing the right name of past and future dolibarr version
>
> Feel free to comment and populate the file if you think it's right
> No need to check version if the file is correctly maintained
>
> With best regards
> Frederic FRANCE
>
> _______________________________________________
> Dolibarr-dev mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/dolibarr-dev