On 15/03/13 13:11 -0700, [email protected] wrote: > The feature of "composite primary keys" is very handy, but let me address > it from a different point of view. > When importing data into any "relational Software" like Tryton, you might > want to update existing records or add new records if none is existing | > where record is an instance of an real life object. With just a primary key > it is basically never possible to do that without intensive scripting and > still that's not save, more than one record might apply for a rule. A > record never can be identified by an integer "primary key" from the outside > world. > Using composite keys, I call them "Identifying fields", implemented on > class level, where never an object can be added violating the unique key > "field a and field b ...field c ... and field n" makes sure, that when > importing data the decision of "update an existing record" or "add a new > one" is distinct (deleting is not covered here).
I don't see why you need primary composite key just use a unique index which is supported by Tryton. -- Cédric Krier B2CK SPRL Rue de Rotterdam, 4 4000 Liège Belgium Tel: +32 472 54 46 59 Email/Jabber: [email protected] Website: http://www.b2ck.com/
pgpDeM1srC5iX.pgp
Description: PGP signature
