class Model_User extends Model_Auth_User {
protected $_table_name = 'community_userdata';
protected $_load_with = array('useronline');
// Relationships
protected $_has_many = array(
'user_tokens' => array('model' => 'user_token'),
'roles' => array('model' => 'role', 'through' => 'roles_users'),
'pictures' => array('model' => 'picture')
);
}class Model_Picture extends ORM {
protected $_table_name = 'community_userdata_bilder';
// Relationships
protected $_belongs_to = array('u' => array('model' => 'user', 'foreign_key' => 'user_id'));
protected $_load_with = array('u', 'u:useronline');
} class Model_Useronline extends ORM {
protected $_table_name = 'community_useronline';
// Relationships
protected $_has_one = array('u' => array('model' => 'user'));
}protected $_belongs_to = array('useronline'); It looks like you're new here. If you want to get involved, click one of these buttons!