Re: What is the right way to handle a hierarchy of same-class objects?

[prev] [thread] [next] [Date index for 2005/02/21]

From: William Ross
Subject: Re: What is the right way to handle a hierarchy of same-class objects?
Date: 13:38 on 21 Feb 2005
On 21 Feb 2005, at 13:12, Karjala wrote:

> I have a class called (MyTest::)Category.
>
> The table of Category has a field ("father") containing the id of the 
> father category of each category.
>
> Objects that don't have a father, have 0 in that field.

Make that NULL instead of 0, and everything should work as you expect.

best

will

ps. there is a bug to look out for if you are doing this kind of thing 
and also have some class-data declarations (eg columns, relationships, 
temp columns) in both your base class and your data classes. Otherwise 
it's completely straightforward.

Re: What is the right way to handle a hierarchy of same-class objects?
William Ross 13:38 on 21 Feb 2005

Generated at 12:48 on 22 Feb 2005 by mariachi v0.52