[TYPO3-mvc] Using existing database tables in a model
Mario Beiser
mariobeiser at googlemail.com
Wed Apr 21 09:19:23 CEST 2010
In article <mailman.10057.1271785163.610.typo3-project-
typo3v4mvc at lists.typo3.org>, dennis.ahrens at googlemail.com says...
>
> Hi Mario,
>
> i've implemented something like this for sys_lockedrecords. In this
> case there was a problem with a not contained pid-field. But in
> general you just have to do the typoscript mapping and thats it.
>
> regards
> Dennis
>
> 2010/4/20 Mario Beiser <mariobeiser at googlemail.com>:
> > Hi there,
> >
> > just tried to have some output of an existing database table in a
> > projekt like e.g. tt_news.
> >
> > Therefore I used a a mapping like it is done in the extbase core for
> > frontend users. When I try to print out my frontend user everything
> > works fine.
> >
> > My question is, how it is possible to have existing tables as a base for
> > a model class? Just the same way the frontend user thing in the
> > Extbase-Extension is done?
> >
> > So the typoscript-mapping is all I have to do?
> >
> > Perhaps someone has done this before.
> > Regards
> > Mario
> >
> > _______________________________________________
> > TYPO3-project-typo3v4mvc mailing list
> > TYPO3-project-typo3v4mvc at lists.typo3.org
> > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
> >
Hi Dennis,
here is my example config:
config.tx_test {
persistence{
enableAutomaticCacheClearing = 1
updateReferenceIndex = 0
classes {
Tx_Test_Domain_Model_News {
mapping {
tableName = tt_news
}
}
}
}
}
I can't see any error here, atm there is no output of the news...
When I understood your message correctly, this mapping should work.
Shouldn't it?
Regards
Mario
More information about the TYPO3-project-typo3v4mvc
mailing list