On Thu, 2003-05-29 at 19:35, Edmund Lian wrote:
> class Component(SQLObject):
> _columns = [
> StringCol("name"),
> StringCol("categoryId", foreignKey="ComponentCategory",
> default=None),
> IntCol("sequenceNum", default=None)]
>
> To behave as follows:
> Instantiating:
> c = Component.new(name="test")
>
> And c should have an attribute "componentCategory" that returns either
> None, or an instance of class ComponentCategory.
>
> In fact, c does not have an attribute called "componentCategory". Am I
> not understanding something?
It should be an attribute category, which is categoryId with the "Id"
removed.
Ian
|