UnionOfRAD/lithium — Issue #330: static::all() in a base Model __init() method doesn't work.
Author: housni
Created: 2012-02-13 07:26:03+00:00
State: open

I have a base model that I've extended in the extensions folder.

I'm trying to add my common validators to the Model::__init() method.
So, I would have a model named Admins that would extend the base Model.

Therefore, in Model::__init(), I've tried ```static::all()``` and it tells me:
```Fatal error: Class 'app\models\Admins' not found in /var/www/ancedu/controllers/AdminsController.php on line 0```

Everything works fine without the static call. Is this a bug or expected behaviour, where static::all() is not allowed in Model::__init()?

Here are the classes involved:
https://gist.github.com/1814410

/var/www/ancedu/extensions/data/Model.php is where my base model is located