Re: [SQLObject] two beginner's questions
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Nick <ni...@dd...> - 2003-04-28 18:40:05
|
On Mon, 2003-04-28 at 12:21, Bud P.Bruegger wrote: > 1. is it possible that I have to assign __connection__ before defining > subclasses of SQLObject? When I don't do this, I seem to run into > problems. Yes, or define _connection in each subclass. > 2. is there a way to control redundancy in the following example: > > class test1 (SQLObject): > _columns = [StringCol("lang", lenght=2, default='en'), > IntCol("someOtherStuffHere")] > > class test2 (SQLObject): > _columns = [StringCol("lang", lenght=2, default='en'), > StringCol("differentStuffThanInTest1")] I had this same problem; I tried to do the same thing by making supertest a class and test1 and test2 subclasses, but that didn't work. It doesn't look like the architecture allows this. Is that right? Nick |