The obvious solution seems to be to do some pre-validation is there a way to get
a list of all the keyword arguments expected by a professor Object?
I use something like this (in SQLObject 0.6.1, not sure if it will work
in later versions):
initValues = {} # populate with values that you already have
for col in Professor._SO_columns:
if not initValues.has_key(col.name):
if col.default is not None and col.default !=
sqlobject.sqlbuilder.NoDefault:
initValues[col.name] = col.default
else:
initValues[col.name] = None
# Create the object
professor = Professor(**initValues)
This isn't very elegant, but it works.
Cheers
Peter
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss