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

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

From: Perrin Harkins
Subject: Re: What is the right way to handle a hierarchy of same-class objects?
Date: 03:13 on 22 Feb 2005
On Tue, 2005-02-22 at 04:25 +0200, Karjala wrote:
> $b->a would be enough, if it would return null instead of an object 
> reference.

It will return null (or really undef) if you have a NULL in that field.
It doesn't do that with 0, since that might be an actual ID.  If you
want to change zeros into undef, you can use a custom inflate method to
do it, but it would be better to change the database if you can.

- Perrin


Re: What is the right way to handle a hierarchy of same-class objects?
Perrin Harkins 03:13 on 22 Feb 2005

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