[SQL-CVS] SQLObject/SQLObject SQLObject.py,1.21,1.22
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <ian...@us...> - 2003-04-17 07:15:21
|
Update of /cvsroot/sqlobject/SQLObject/SQLObject In directory sc8-pr-cvs1:/tmp/cvs-serv29696/SQLObject Modified Files: SQLObject.py Log Message: Added basic functionality test Fixed properties bug (where only overriding one of get/set wouldn't cause the other one to be used) Index: SQLObject.py =================================================================== RCS file: /cvsroot/sqlobject/SQLObject/SQLObject/SQLObject.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** SQLObject.py 17 Apr 2003 02:59:29 -0000 1.21 --- SQLObject.py 17 Apr 2003 07:15:14 -0000 1.22 *************** *** 153,160 **** dict['q'] = SQLBuilder.SmartTable(dict['_table']) - # makeProperties turns all the _get_/_set_ stuff into - # properties. - makeProperties(dict) - # If the connection is named, we turn the name into # a real connection. --- 153,156 ---- *************** *** 170,173 **** --- 166,170 ---- # We actually create the class. newClass = type.__new__(cls, className, bases, dict) + newClass._SO_finishedClassCreation = False for column in newClass._columns[:]: *************** *** 185,189 **** --- 182,189 ---- setNeedSet() + # We don't setup the properties until we're finished with the + # batch adding of all the columns... newClass._SO_finishedClassCreation = True + makeProperties(newClass) # And return the class *************** *** 226,230 **** if len(setters) == 1 and setters.has_key('doc'): continue ! if d.has_key(var): continue setFunc(var, property(setters.get('get'), setters.get('set'), --- 226,231 ---- if len(setters) == 1 and setters.has_key('doc'): continue ! if d.has_key(var): ! continue setFunc(var, property(setters.get('get'), setters.get('set'), |