[SQLObject] by<Columnname> method for ForeignKey column
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Ksenia M. <ks...@ks...> - 2004-10-28 23:47:46
|
Hi all, I have a table with unique ForeignKey, because it has one-to-one relationship with another table: class Question(SQLObject): question = StringCol() component = ForeignKey('Component', alternateID=True, cascade=True) But Question.byComponent() doesn't work: AttributeError: type object 'Question' has no attribute 'byComponent' Shouldn't it be used that way? Sorry if I am missing something, it's kind of late and this is my first application with SQLObject. BTW, it's an amaizingly cool component that saves a lot of boring work :) Many thanks to Ian Bicking for creating it. Ksenia. |