On 26/05/2015 14:35, Nicolas Évrard wrote:* Pierre-Louis Bonicoli [2015-05-26 13:58 +0200]:On 26/05/2015 09:19, Nicolas Évrard wrote:(It is probably better to use an hexadecimal representation of the hash in order to reduce its length).But it is still possible to create a table that will collide with another whose name is too long (unless we transform every table with this function but it is not a desirable behavior according to me).You mean that collision is still possible using a model name like 'account.invoice.paymen97171639' ?Yes.Model name using numbers only from twenty-third to thirtieth characters could be considered as invalid.
If we decide to implement to such a rule then we might as well decide that model name must be < 30 character wide.
I find this idea quite elegant (because there is no need for the configuration file) but the names generated will be strange and not meaningful. So for the sake of interoperability with other systems I still prefer the mapping solution (although it's an ugly one and I would welcome a better idea).If the chosen solution is the mapping one, the documentation (core and each module) should list the names of the tables.Why should it?How will an administrator know that the table used by the model 'account.invoice.payment_term.line.relativedelta' should be mapped ?
If the installation does not crash (can we expect a DBMS to truncate silently the name of a table? (MySQL maybe)) then there will be no error so maybe we should raise an error ourselves.
Before a new module installation, knowing only the name of a table which should be mapped, how will an administrator know the names of the other tables used by this module - the names he can not use with the mapping ?
He will indeed have to compute the name of the new table. But I guess they tested their work before going live. -- Nicolas Évrard - B2CK SPRL E-mail/Jabber: [email protected] Tel: +32 472 54 46 59 Website: http://www.b2ck.com/
signature.asc
Description: Digital signature
