[TYPO3-mvc] Cannot get findByProperty to work
Mark Kuiphuis
spam at markyourweb.com
Mon Jan 2 08:17:12 CET 2012
Hi Georg,
I hadn't, but just added this one, but no change...(orders are saved in PID 0
anyway)..could that maybe generating the error?
I also tried to override this function in the OrderRepository with the following
function:
public function findByTransactionId($transactionId){
$query = $this->createQuery();
$query->getQuerySettings()->setRespectStoragePage(FALSE);
return $query->matching($query->equals('transaction_id', $transactionId))->execute();
}
I do use the setRespectStoragePage(FALSE) there...(however, orders are saved in PID
0...something else I need to solve :(
The generated SQL looks like this:
SELECT tx_travelprograms_domain_model_order.* FROM
tx_travelprograms_domain_model_order WHERE
tx_travelprograms_domain_model_order.transaction_id = ? AND
tx_travelprograms_domain_model_order.deleted=0 AND
tx_travelprograms_domain_model_order.hidden=0 AND
tx_travelprograms_domain_model_order.pid IN (0)
Without debugging with Tx_ExtDebug::var_dump($orders) I do get to see the view, but
no variables {order.uid} etc. etc. will be replaced...(but are added to the view with
$this->view->assign('order', $order);
With debugging with Tx_ExtDebug::var_dump($orders) I do get the error:
#1210859206: Cannot return value of private property "warning.
Tx_Extbase_Reflection_Exception thrown in file
/private/var/www/typo3_src/typo3_src-4.5.10/typo3/sysext/extbase/Classes/Reflection/PropertyReflection.php
in line 95.
Potentially this could be an Ext_Debug bug... but looking in the
PropertyReflection.php class it looks like $this->isPrivate() returns TRUE....but the
property $transactionId in the model has been set to protected..(I also tried public,
but again to no avail)....
Thanks, Mark
On 2/01/12 4:50 PM, Georg Ringer wrote:
> Hi Mark,
>
> did you set the pid in your TS?
> this would be plugin.tx_extkey.persistence.storagePid
>
> byUid ignores this setting but all of the others do you use this.
>
> georg
More information about the TYPO3-project-typo3v4mvc
mailing list