Re: [SQLObject] a third way of accessing attributes
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Bud P. B. <bu...@si...> - 2003-05-15 16:43:58
|
On Thu, 15 May 2003 10:55:32 -0500 Luke Opperman <lu...@me...> wrote: > Hmm, intriguing, as I said.. I was really surprised about this possibility myself. In my personal style, I would like to write application classes independently of any kind of persistence mechanism first and then add persistence in a second step. I guess in SQL object, I'd do that something along the following lines: (and yes, one doesn't need to do it that way in SQLObject) class Person(object): pass #add all business logic here class PersistentPerson(Person, SQLObject) _columns = [...] _joins = _idName = .. _table =... _connection = # I'd personally prefer to deal with that later... So in my current approach, there is a similar structure: class Person(object): pass #add all business logic here persClassMap = ClassMap(....) cheers --b |