Revision 1477: /SQLObject/trunk
'Magic' attributes created using the _get_xxx special
method are not included in the dictionary returned by
sqlmeta.asDict(). This is because the magic attributes
are not in sqlmeta.columns, which asDict uses to get
the property names.
The work around I use for now is to add the attribute
names to sqlmeta.columns explicitely. I just use a
string for the value. I have no idea what side effects
this may cause, but it makes asDict work the way i
want it to.
firstname = StringCol(length=20, default='')
lastname = StringCol(length=20, default='')
Person.sqlmeta.columns['image'] = 'Magic attribute'
Log in to post a comment.