adrian <adrian <at> exoweb.net> writes: > > > Is there a way to create multiple tables which share an id field? My > meaning is that ids would be unique over both tables.
One way to do this with django is with a MasterTable that is responsible for the key. For the tables across which you want the unique keys, you include a OneToOneField(MasterTable). Then provide a validator method on MasterTable ensuring that any MasterTable record has a relationship to one and only one of its potential child tables. This validator is possible using the magic methods get_childa(), get_childb(), etc.