On 26 May 16:08, Pierre-Louis Bonicoli wrote:
> On 26/05/2015 15:18, Cédric Krier wrote:
> > On 26 May 14:35, Nicolas Évrard wrote:
> >> * Pierre-Louis Bonicoli [2015-05-26 13:58 +0200]:
> >>> If the chosen solution is the mapping one, the documentation (core and
> >>> each module) should list the names of the tables.
> >>
> >> Why should it?
> >>
> >> If it's up to the administrators of the tryton server to decide which
> >> name a table should have through configuration why should we add this
> >> information in the documentation? We might as well define the name of
> >> the tables in the objects if this information is static.
> >>
> >> But of course the mapping defined in the configuration has to be known
> >> by people using other systems to access the data. But this is up to
> >> the people implementing their ERP to provide this information.
> >
> > Indeed it is the opposite, if we implement the pilou proposal we will
> > have to document the table name that each Model will get under every
> > conditions (each backend constraint).
>
> Why would that be needed ?
I want to write a SQL query on the database (not inside trytond), how
can I know the tables to use as they are generated instead of using the
class name.
More over with your design we will have a lot of 'account_invoicexxxx'
and the worst part of this design is that usually it is the last char of
the name that contains the most important information.
For example:
- account_invoice_line
- account_invoice_tax
- account_invoice_line-account_tax
While with my proposal, it is explicit (better than implicit) and use
can use meaningful table name for his usage like:
- acc_inv_line
- acc_inv_tax
- acc_inv_line-tax
--
Cédric Krier - B2CK SPRL
Email/Jabber: [email protected]
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/