[TYPO3-mvc] resetting query settings for extbase cronjob
Domi
djgarms at gmail.com
Fri Aug 2 15:00:07 CEST 2013
Hi Philip,
I hadn't have good experience with the property mapper. But why is this
not working:
$languageUid = 0;
$query = $this->createQuery();
$query->getQuerySettings()->setSysLanguageUid($languageUid);
if ($languageUid > 0) {
$constraint = $query->equals('l10nParent', $mailTemplateUid);
} else {
$constraint = $query->equals('uid', $mailTemplateUid);
}
$result = $query->matching(
$constraint
)->execute()->toArray();
$languageUid = 4;
$query = $this->createQuery();
$query->getQuerySettings()->setSysLanguageUid($languageUid);
if ($languageUid > 0) {
$constraint = $query->equals('l10nParent', $mailTemplateUid);
} else {
$constraint = $query->equals('uid', $mailTemplateUid);
}
$result = $query->matching(
$constraint
)->execute()->toArray();
If I start this, then the second $result only gives the default (0)
overlay. If I turn this example around, then it would give the overlayed
record only.
Try this in one of your repositories, you will find out the same behaviour.
This smells for me like a bug, because everything seems to run fine, but
somewhere it breaks and only gives back the old result.
Cheers
Dominic
More information about the TYPO3-project-typo3v4mvc
mailing list