In case that you didn't notice, the model class is loaded automatically when using with DooSqlMagic db object (since the initial 1.0).
- Code: Select all
//You do not have to load User.php
Doo::db()->find('User');
However, you would need to load the Model if you're doing this:
- Code: Select all
Doo::loadModel('User');
$user = new User;
$user->name = 'Leng';
Doo::db()->find($user);
