Am 12.12.2010 14:47, schrieb Jacek Kałucki:
> Użytkownik Sibylle Koczian napisał:
>> Database: taken from tutorial.sqlite and minimized to this schema:
>>
>> sqlite> .schema
>> CREATE TABLE reccat (recid INTEGER NOT NULL REFERENCES recipes(id),
>> catid INTEGER NOT NULL REFERENCES reccats(id),
>> PRIMARY KEY (recid, catid));
>> CREATE TABLE reccats (id INTEGER PRIMARY KEY, descrp text NOT NULL UNIQUE);
>> CREATE TABLE recipes (id INTEGER PRIMARY KEY, title text NOT NULL UNIQUE,
>> date date NOT NULL default ‚0000-00-00‘);
>> CREATE INDEX recipes_date on recipes (date);
>>
>> Table reccat now has a composite primary key consisting of its two columns.
>>
>> Data: from tutorial table recipes ID 1-20, complete table reccats, all
>> records from reccat with recid 1-20.
>>
>
> Could you show me please, bizobj definition properties:
> PrimaryKey, LinkField, ParentLinkField?
>
Here they are, for the reccat table (do you need the others?):
class BizCategoriesForRecipe(dabo.biz.dBizobj):
def initProperties(self):
self.DataSource = "reccat"
self.KeyField = "recid, catid"
self.LinkField = "recid"
self.AutoPopulatePK = False
I didn't set ParentLinkField, because the LinkField references the
primary key in the parent table.
Greetings
Sibylle
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]