Hi, how i can use 2 collections in one Model. e.g.
class Admin extends Collection{
public function getSource(){
return "user1"
}
public static function findUser1(){
$user1 = new Admin();
$user1->setSource("user1");
$cursor = $users1->find()
foreach($cursor as $doc){
echo $doc['login']
}
}
public static function findUser2(){
$user2 = new Admin();
$user2->setSource("user2");
$cursor = $users2->find()
foreach($cursor as $doc){
echo $doc['login']
}
}
}
But, will work only findUser1.
setSource work only with insert operation, where i mistake ?