Either rename 'category' to 'task_category' in class Task or set
tasks in TaskCategory using:
tasks = MultipleJoin('Task', joinColumn='task_category_id')
Lee
On 12/8/05, DaveS <[EMAIL PROTECTED]> wrote:
>
> (TurboGears 0.8a5)
>
> given the following model (using sqlite):
>
> class Task(SQLObject):
> name = StringCol(length=50, notNull=True)
> category = ForeignKey('TaskCategory')
>
> class TaskCategory(SQLObject):
> name = StringCol(length=50, notNull=True)
> tasks = MultipleJoin('Task')
>
> this gives me an error:
>
> >>> t = TaskCategory.select()[0]
> >>> t.tasks
> OperationalError: no such column: task_category_id
>
> I checked the database that was created and the "task" table has a
> "category_id" column for the foreign key.
> I guess I'm confused about the relationship between the variable name
> and the string parameter in the ForeignKey definition. Any insight is
> appreciated.
>
> --
> DaveS
>
>