[TYPO3-mvc] Cannotcastobjectoftype"Tx_Extbase_Persistence_QueryResult" tostring.

Johannes C. Schulz - EnzephaloN IT-Solutions info at enzephalon.de
Tue Jun 14 19:42:51 CEST 2011


Hello together

Some steps later:
1.) changed address-link in teaseritem TCA
'address' => array(
		'exclude'	=> 0,
		'label'		=>
'LLL:EXT:enz_teaserlist/Resources/Private/Language/locallang_db.xml:tx_enzte
aserlist_domain_model_teaseritem.address',
	'config'	=> array(
		'type' => 'select',
		'foreign_class' => 'Tx_Enzteaserlist_Domain_Model_Address',
		'foreign_table' => 'tt_address',
		'foreign_field' => 'uid',
		'foreign_table_where' => 'ORDER BY tt_address.name ASC',
		'minitems' => 0,
		'maxitems' => 1,
		'size' => 1,
	)
),

2.) added AddressRepository
With all fields I might use

3.) added field-mapping to setup.txt
plugin.tx_enzteaserlist.persistence.classes {
	Tx_Enzteaserlist_Domain_Model_Address {
		mapping {
			tableName = tt_address
			recordType = Tx_Enzteaserlist_Domain_Model_Address
			columns {
				name.mapOnProperty = name
				first_name.mapOnProperty = first_name
				[...]

4.) added Address model
With all fields as protected vars and all get-function I might need

5.) now I have no more ideas :-(
Short explanation about my extension:
It stores data to show a list and detail-page
It should be connected to tt_address database

Any ideas from you?

Best regards
Johannes

-----Ursprüngliche Nachricht-----
Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org
[mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag von
Johannes C. Schulz - EnzephaloN IT-Solutions
Gesendet: Dienstag, 14. Juni 2011 14:46
An: 'TYPO3 v4 MVC project'
Betreff: Re:
[TYPO3-mvc]Cannotcastobjectoftype"Tx_Extbase_Persistence_QueryResult"
tostring.

Hi Franz

No, none of such models. Til' now - cause I've not implemented the get/set
for tt_address-Fields. At this time there's only protected adressess
variable.

Best regards
Johannes
 
-----Ursprüngliche Nachricht-----
Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org
[mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag von
Franz Koch
Gesendet: Dienstag, 14. Juni 2011 14:10
An: typo3-project-typo3v4mvc at lists.typo3.org
Betreff: Re: [TYPO3-mvc]
Cannotcastobjectoftype"Tx_Extbase_Persistence_QueryResult" to string.

Hey,

> I'm not sure about your second question. Maybe I've to add some functions
to
> the model of properties I inserted later? This might be a good hint.

question is, if you have models with modified/extended properties that 
internally trigger some service or return a query result of a 
repository. So not just properties returning the according DB value but 
custom/additional properties/getters returning special data gathered 
from a service etc.

-- 
kind regards,
Franz Koch
_______________________________________________
TYPO3-project-typo3v4mvc mailing list
TYPO3-project-typo3v4mvc at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc


_______________________________________________
TYPO3-project-typo3v4mvc mailing list
TYPO3-project-typo3v4mvc at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc




More information about the TYPO3-project-typo3v4mvc mailing list