[TYPO3-mvc] Something changed ... "sorting" column is ambigous
Susanne Moog
typo3 at susannemoog.de
Mon Oct 5 21:47:25 CEST 2009
Hi everyone,
well, I finally came back after two or three months not working on my
shiny extbase extension and everything changed ;). Now I'm trying to get
it back working but I'm not even able to get findAll() to work. This is
my problem:
$this->addressRepository =
t3lib_div::makeInstance('Tx_Addresses_Domain_Model_AddressRepository');
$this->addressRepository->findAll();
As soon as findAll is called there is a sql error "Column 'sorting' in
order clause is ambiguous".
Is there something special I have to set when using findAll?
FYI: the query executed is:
"SELECT
tx_addresses_address_addressgroup_mm.*,tx_addresses_domain_model_addressgroup.*
FROM tx_addresses_address_addressgroup_mm LEFT JOIN
tx_addresses_domain_model_addressgroup ON
tx_addresses_address_addressgroup_mm.uid_foreign =
tx_addresses_domain_model_addressgroup.uid WHERE uid_local = '1' AND
tx_addresses_domain_model_addressgroup.deleted=0 AND
tx_addresses_domain_model_addressgroup.hidden=0 AND
tx_addresses_domain_model_addressgroup.pid IN (0) ORDER BY sorting ASC"
Mainly I don't understand why
1) the "sorting" is not prefixed with a table name
2) he queries addressgroups instead of addresses
(Error occurs even if the addressgrouprepository is empty).
SQL/Ext_tables etc can be found here:
http://forge.typo3.org/repositories/show/extension-addresses
Thanks for any help.
Susanne
--
Susanne Moog
NEUSTA GmbH - www.neusta.de
More information about the TYPO3-project-typo3v4mvc
mailing list