[TYPO3-mvc] Extending Tx_Extbase_Domain_Model_FrontendUser

Rens Admiraal renst3 at e-rank.nl
Thu Jan 14 14:11:17 CET 2010


The mapping has to be wrong someway, I've created a little member plugin to 
illustrate the problem:
http://e-rank.nl/t3/T3X_member-0_0_0-z-201001141408.t3x

This results in a table does not exist error, unless I change the constructor 
of Tx_Extbase_Persistence_Mapper_DataMap in which I add the following line:
if ($this->tableName == 'tx_member_domain_model_member') { $this-
>setTableName('fe_users'); }

So, somehow the $tableName parameter of the DataMap class isn't passed to the 
constructor when I use:
config.tx_member {
	persistence{
		enableAutomaticCacheClearing = 1
		updateReferenceIndex = 0
		classes {
			Tx_Member_Domain_Model_Member {
				mapping {
					tableName = fe_users
					columns {
						usergroup.foreignClass = Tx_Extbase_Domain_Model_FrontendUserGroup
						lockToDomain.mapOnProperty = lockToDomain
					}
				}
			}
		}
	}
}

On Thursday 14 January 2010 13:57:25 Rens Admiraal wrote:
> On Thursday 14 January 2010 13:51:32 Franz Koch wrote:
> > Hi,
> >
> > > If inheritance does not work.
> >
> > I don't have any issues with inheritence so far - but I haven't updated
> > a record yet. But extending classes and remapping the tables is working
> > for me.
> 
> How do you remap the tables?
> 
> > >> and extend Tx_Extbase_DomainObject_AbstractEntity now. But it's still
> > >> saving all records in the wrong table... Do you have some example
> > >> code???
> >
> > How can they be saved in the wrong table? Therefor the "wrong" table has
> > to exist - but why would you have a duplicate table of fe_users? Try to
> > rename the table so that extbase doesn't find your duplicate and only
> > deal with fe_user table if you try to work with FrontendUsers.
> 
> Franz: I first created the objects using the kickstarter, and changed them
> afterwards. This is the reason why the records is saved in the wrong table.
> Otherwise it would been a "table doesn't exist" error
> 
> _______________________________________________
> 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