propelorm/Propel — Issue #211: Delegate behavior needs to be namespace-aware
Author: kstorch
Created: 2011-12-02 09:31:00+00:00
State: open

The generated code for a table which delegates to the table 'user' with the delegate behavior contains the following lines in the magic __call-function:
```php
if (is_callable(array('User', $name))) {
...
}
return parent::__call($name, $params);
```
The string 'User' ist not influenced by the namespace of the generated User class. If the User class is in the namespace 'ns', the condition should be something like:
```php
is_callable(array('\ns\User', $name))
```
Alternatively something like method_exists($delegate, $name) is a more elegant way to solve the problem.