I'm trying to add a one to many relationship to the \Warden\Model_User - I tried extending it in my APP model.
<code>
class Model_User extends \Warden\Model_User
{
protected static $_has_many = array(
"properties" // reference to Model_Property
);
}
</code>
But when the ORM gets down to the Warden package it cannot find my app's Model_Property and is throwing an OutOfBoundsException.
errors below
OutOfBoundsException [ Error ]: Property "properties" not found for Warden\Model_User.
PKGPATH/orm/classes/model.php @ line 806
PKGPATH/warden/classes/warden/model/user.php @ line 179
APPPATH/classes/controller/test/property.php @ line 15
COREPATH/classes/request.php @ line 420
DOCROOT/index.php @ line 38
This error is probably generated by the Warden code itself, which runs in the \Warden namespace.
Because you haven't defined the 'model_to' in your relation, it will probably try to find Model_Property in the \Warden namespace, and not in global.
Try this:
This is off course assuming that the Warden code is written so that you can extend it this way. If it contains code that assumes that all properties are table columns, you might have more issues implementing this.