[TYPO3-mvc] Extending Tx_Extbase_Domain_Model_FrontendUser

Xavier Perseguers typo3 at perseguers.ch
Thu Jan 14 13:35:12 CET 2010


Hi,

If inheritance does not work, you may have another solution in the mean 
time. I did not test it but I'm pretty sure it would work. The idea is 
as follows:

- Create some Person class on your own
- Have of its property that is a frontenduser, this will be a foreign 
key on a feuser record and all changes on this object should be properly 
handled by Extbase using its "native" feuser model
- Duplicate properties (getter/setter) of feuser into your model and put 
code that accesses/modifies the underlying feuser
- Add your own properties

It should work.

Xavier

On 14.01.2010 13:29, Rens Admiraal wrote:
> Hi David,
>
> So you just extend from Tx_Extbase_DomainObject_AbstractEntity, and use the
> typoscript mapping like the  the frontenduser object of extbase?
>
> I just merged all properties of the frontenduser object into my Person object,
> and extend Tx_Extbase_DomainObject_AbstractEntity now. But it's still saving
> all records in the wrong table... Do you have some example code???
>
>
> Greetz,
> Rens
>
>
> On Thursday 14 January 2010 12:49:31 David Schreiber wrote:
>> Hello Lens,
>>
>> I'm not sure if extending the FrontendUser model works with Extbase. I
>> didn't succed in doing so. It always resulted in wrong mapping of the
>> fe_users table to my 'Member' model.
>>
>> I configured my mapping like you did, but didn't extend the
>> FrontendUser class. Instead I duplicated the FrontendUser model as my
>> Member model, and extended this with the properties needed (no
>> inheritance at all).
>>
>> This sure isn't the best method, but it's the only one that I was able
>> to get running correctly.
>>
>> David Schreiber
>> _______________________________________________
>> TYPO3-project-typo3v4mvc mailing list
>> TYPO3-project-typo3v4mvc at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>>


-- 
Xavier Perseguers
http://xavier.perseguers.ch/en


More information about the TYPO3-project-typo3v4mvc mailing list