[TYPO3-mvc] Domain model records without pid-column
Felix Oertel
typo3 at foertel.com
Mon May 24 12:53:14 CEST 2010
Hey Sebastian,
Sebastian Kurfürst schrieb:
>> Would it be semanticly correct to assume (per default) that a page has (and wants to use) a pid?
> I'd go the other way round, and say that by default, a record *has* a PID. As that's the standard way of using Records / Plugin Content in TYPO3 v4.
you are right, but propably you allready knew that. :-P
i set up a database table without PID column and tried to add a record
on a page. I expected that this will somehow magicly fall into the big
TYPO3 globe or alike ... that didn't happen but:
SQL error: 'Unknown column 'pid' in 'field list''
(tx_extcoretest_domain_model_foo:NEW4bfa51f11edd5)
so yes, TYPO3 requires a PID column - at least if records of a table are
allowed to be created on pages.
first glance: only records stored on a page need a PID ... skipping PID
for a page-stored record does not work (TYPO3 requirement) and using a
PID for a not page-stored record would not make much sense either.
propably we can take a look at $PAGES_TYPES['default']['allowedTables'],
for this is where all the tables that allow records to be stored on
pages are named. this could possibly save us a dedicated TS parameter.
if this works out, I would suggest to introduce the TS parameter
ignoreStoragePid = 1 to allow extbase fetching records from anywhere.
regards, foertel
More information about the TYPO3-project-typo3v4mvc
mailing list