SQLObject assumes that columns are to be treated
as NOT NULL unless they have defaults.   Either give
my_pcinfo a default value of None, or assign a pcinfo
when you create the owner.

Soln 1:

Make a default.

class owner(SQLObject):
    my_pcinfo = ForeignKey('pcinfo',cascade=True, default=None)
    FirstName = StringCol(length=20, varchar=True)
    LastName = StringCol(length=30, varchar=True)

x = owner(FirstName='doug', LastName='henning')

Soln 2:

Assign a value.

pc = pcinfo(IPNbr='127.0.0.1', HostName='foo')
x = owner(my_pcinfo=pc, FirstName='doug', LastName='henning')

- Jeff Younker - [EMAIL PROTECTED] -



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to