hello
this is my sample code:
---
from SQLObject import *
conn = MySQLConnection(user='abc', db='abook', passwd='def')
class Person(SQLObject):
_connection = conn
firstName = StringCol()
lastName = StringCol()
#Person.createTable()
p1 = Person.new(firstName="Frodo", lastName="Baggins")
p2 = Person(firstName="Bilbo", lastName="Baggins")
---
creating p1 works fine and Frodo is inserted into the database.
but Bilbo does not work. but according to the Documentation it should
work if I understand this correctly.
I get this error:
p2 = Person(firstName="Bilbo", lastName="Baggins")
TypeError: __new__() got an unexpected keyword argument 'lastName'
I have Python 2.3.3
and a SQLObject Snapshot I downloaded a few days ago.
but I am not sure if this is the correct version. the documentation says
0.6, but setup.py says 5.1
any hints ?
I am quite new to SQLObject, so maybe I just did not understand
everything correctly.
regards
Markus
|