[TYPO3-mvc] query contains exception
Bas van der Togt
b.vandertogt at profinit.com
Thu May 16 21:14:53 CEST 2013
Hello,
I have a problem with the contains method but don't know what i'm doing
wrong.
When executing this query from my respository:
$query = $this->createQuery();
$query->getQuerySettings()->setRespectStoragePage(false);
$query->matching($query->contains('services', $service));
return $query->execute();
I get this exception: "Unsupported or non-existing property name
"services" used in relation matching."
My TCA
...
'services' => array(
'exclude' => 0,
'label' =>
'LLL:EXT:gc/Resources/Private/Language/locallang_db.xlf:tx_gc_domain_model_testimonial.services',
'config' => array(
'type' => 'select',
'items' => array(
array('LLL:EXT:gc/Resources/Private/Language/locallang_db.xlf:tx_gc_domain_model_testimonial.services.1',
'1'),
array('LLL:EXT:gc/Resources/Private/Language/locallang_db.xlf:tx_gc_domain_model_testimonial.services.2',
'2'),
array('LLL:EXT:gc/Resources/Private/Language/locallang_db.xlf:tx_gc_domain_model_testimonial.services.3',
'3'),
array('LLL:EXT:gc/Resources/Private/Language/locallang_db.xlf:tx_gc_domain_model_testimonial.services.4',
'4'),
),
'size' => 4,
'minitems' => 1,
'maxitems' => 4,
)
),
...
My model
class Testimonial extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
/**
* services
*
* @var \string
* @validate NotEmpty
*/
protected $services;
/**
* name
*
* @var \string
* @validate NotEmpty
*/
protected $name;
/**
* Returns the services
*
* @return \string $services
*/
public function getServices() {
return $this->services;
}
/**
* Sets the services
*
* @param \string $services
* @return void
*/
public function setServices($services) {
$this->services = $services;
}
...
Can anybody tell me what i'm doing wrong?
Kind regards,
Bas
More information about the TYPO3-project-typo3v4mvc
mailing list