//parameters match with uid of table
$matchVal = 1;
//create object of repository that need to be called
$jobs = new Tx_Jobs_Domain_Repository_JobsRepository();
//create query and get details of all properties under model
$query = $jobs->createQuery();
$cond = $query->equals("uid",$matchVal);
$query->matching($cond);
//for fetching just one property (only description will be fetched)
$row = $query->execute()->getFirst()->getDescription();
print_r($row);
//for fetching all property (All properties will be fetched)
$row = $query->execute()->getFirst();
print_r($row);
$matchVal = 1;
//create object of repository that need to be called
$jobs = new Tx_Jobs_Domain_Repository_JobsRepository();
//create query and get details of all properties under model
$query = $jobs->createQuery();
$cond = $query->equals("uid",$matchVal);
$query->matching($cond);
//for fetching just one property (only description will be fetched)
$row = $query->execute()->getFirst()->getDescription();
print_r($row);
//for fetching all property (All properties will be fetched)
$row = $query->execute()->getFirst();
print_r($row);
it is better to use the objectManager to create a new Repository Object.
ReplyDelete$this->objectManager->get('Tx_Jobs_Domain_Repository_JobsRepository');
or namspaced:
$this->objectManager->get('Vendor\Jobs\Domain\Repository\JobsRepository');