On 25 May 08:34, Raimon Esteve wrote: > 2015-05-21 17:52 GMT+02:00 Cédric Krier <[email protected]>: > > > > Hi, > > > > I'm facing a limitation with how trytond generate the table name for a > > ModelSQL. Databases have different length limitation for schema name. > > For example, > > PostgreSQL has the limit to 64 when Oracle has the limit to 30 > > (yes I'm working on an Oracle backend). > > > > I don't want that we change our naming convention because it is quite > > good and reducing the name will just bring a lot in readability. > > And we will be forced to use the least common constraint. > > > > So my idea is to have a configuration section which will provide the > > table name to use for a Model. > > > > Example: > > > > [table] > > account.invoice.payment_term.line.relativedelta = acc_inv_pt_l_reldelta > > account.payment.sepa.message = acc_payment_sepa_msg > > > > Of course such configuration could not be modified once a database has > > been created (or the table should be renamed). > > > > Side effect, it could also be used to fix naming conflict between 2 > > unrelated module (at the database level not Model.__name__). > > > > What do you think? > > Other idea is about add new attribute class to reference "short databade > name". > > for example, now we have (1): > > _table = 'party_category_rel' > > Idea is to add new attribute short table: > > _short_table = 'par_cat_rel' > > And finally a new param in database section in trytond.conf database > to active/desactive short tables names.
And who will set all those "short" name? And what will be the properties of such short name? Which length is allowed? How prevent they don't collide? -- Cédric Krier - B2CK SPRL Email/Jabber: [email protected] Tel: +32 472 54 46 59 Website: http://www.b2ck.com/
