On 22 Nov 2010, at 14:00, Ivo Võsa wrote:

> Kornel Lesiński wrote:
>> That breaks behavior expected of PHP properties. If $obj->foo is supposed to 
>> have non-NULL value, then isset($obj->foo) shouldn't be returning false.
>> 
>> I consider that a Doctrine bug (leaky abstraction) and suggest that you 
>> patch Doctrine's __isset() to return true if relation exists, even if it 
>> isn't loaded yet. 
>> I think that's a better solution — it will make Doctrine's abstraction more 
>> robust, and won't require PHPTAL to have workaround for other application's 
>> inconsistent behavior.
>>  
> Easier said than done.
> If users generaly have phonenumbers, it does not mean this concrete user has 
> phonenumber, can't be sure about it before call to database has been made.

I'm not sure what you mean. If you're trying to output property in PHPTAL, then 
it has to be read anyway.

Why is check for $obj->hasRelation() in PHPTAL ok, but not in Doctrine's 
__isset()?

-- 
regards, Kornel


_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to