CodeIgniter Forums
Eloquent cannot find Code Igniter Model - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Eloquent cannot find Code Igniter Model (/showthread.php?tid=57712)



Eloquent cannot find Code Igniter Model - El Forum - 04-04-2013

[eluser]coderego[/eluser]
So I am using Eloquent with code igniter and getting some interesting bugs.
Code:
class Brand_model extends MY_Model {


public function size()
{
    return $this->hasOne('Size');
}
}
That line errors when trying to load my Size model:

Code:
class Size extends  MY_Model {

    public function brand(){
        return $this->belongsTo('Brand');

    }


}
"Unable to find class Size"

Any ideas?


Eloquent cannot find Code Igniter Model - El Forum - 04-06-2013

[eluser]jmadsen[/eluser]
Are you actually loading class "Size" anywhere?