Re: [SQLObject] problem with contructor of an object
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Ian B. <ia...@co...> - 2004-08-19 00:30:43
|
Markus Jais wrote: > 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") This must be some confusion between SQLObject 0.5 and 0.6 -- in 0.5 your p1 example (with .new()) is correct, in 0.6 (which is unrelease, and only available through svn://colorstudy.com/trunk/SQLObject) it is like your p2 example. -- Ian Bicking / ia...@co... / http://blog.ianbicking.org |