Re: [SQLObject] a third way of accessing attributes
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Nick <ni...@dd...> - 2003-05-15 15:20:48
|
On Thu, 2003-05-15 at 07:38, Bud P.Bruegger wrote: > Some time ago, Nick and Ian (and others?) discussed about two ways of > exposing SQL data through object attributes: > > * metaclasses (current SQLObject) that set properties > * __getattr__ and __setattr__ > > There seems to be a third way: > > * Adding methods and properties (attributes) to a class at runtime > (sans metaclasses). The problem with this approach is that you won't be able to automatically resolve foreign keys at access time unless the method for accessing foreign keys is only handled through methods, which both __getattr__ and properties do. Nick |