[TYPO3-mvc] Property / relation problem
Claus Due
claus at wildside.dk
Fri Feb 3 10:48:31 CET 2012
Hi Alex,
It sounds like the Property Mapper cannot map the value "54" to an object that makes sense, which could be a problem in the annotations (incorrect data type) or the TCA (incorrect/missing info that this field can be used and may be used by Extbase too - i.e. field should be visible when editing a user in the BE).
--
Cheers,
Claus
http://fedext.net
On Feb 3, 2012, at 10:27 AM, Alexander Dick wrote:
> Hmmm, now that I am using UIDs there is another problem.
>
> when I submit the form with a selected country, I get the following error:
>
> Exception while property mapping at property path "user.country":Object with identity "54" not found.
>
> I did it exactly the same way like all my other relations, which are working.
>
> I found that when I set the country field in the database manually to "54", the error is gone - but only if I select the country with the ID 54. As soon as I select another one, the above error appears.
>
> What am I getting wrong here?!
>
> Thanks
> Alex
>
> Am 02.02.2012 18:19, schrieb Claus Due:
>> Hi Alex,
>>
>> Sounds like you could be running into a limitation in Extbase. After checking, it appears that Extbase will not allow any other field to be the UID - other than the field "uid". Perhaps this will help:
>>
>> http://forge.typo3.org/issues/25984
>>
>> ...although you would have to hack the Extbase core to do that and I'm not sure if there are other adverse effects. There probably are.
>>
>> My recommendation: use the UID. The static info tables are... well.. static tables ;)
>>
>> --
>> Cheers,
>> Claus
>> http://fedext.net
>>
>> On Feb 2, 2012, at 5:25 PM, Alexander Dick wrote:
>>
>>> Well, if I add recordType, then my User object is empty.
>>>
>>> The field record_type does not exist in fe_users, but there is tx_extbase_type and it's populated with Tx_Extbase_Domain_Model_FrontendUser.
>>>
>>> What would the recordType be for?
>>>
>>> I also map static_countries:
>>>
>>> Tx_Xxx_Domain_Model_StaticCountry {
>>> mapping {
>>> tableName = static_countries
>>> }
>>> }
>>>
>>> The problem is supposedly that extbase does not know that I want to map the country property to the cn_iso_2 column of the static_countries table as I am not defining this anywhere since I dont have a TCA config for my User model.
>>>
>>> kind regards
>>> Alex
>>>
>>> Am 02.02.2012 17:09, schrieb Claus Due:
>>>>> PS: As soon as I add recordType it breaks completely.
>>>>
>>>> Define "breaks completely"? ;) any error messages to consider or just a big black hole of nothing (empty page)?
>>>>
>>>> I assume the record type field is added to SQL/TCA OK? Unfortunately I'm not really comfortable with the inner workings of the object-to-table mapping in Extbase - but really, I would expect an error message to be visible somewhere.
>>>>
>>>> Last question for this email :) do you have a mapping statement for the static_info_country table that says "map to Tx_Xxx_Domain_Model_StaticCountry"? This would also be required.
>>>>
>>>> --
>>>> Cheers,
>>>> Claus
>>>> http://fedext.net
>>>>
>>>>
>>>
>>> _______________________________________________
>>> 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