[TYPO3-mvc] MM-relations? non-persistant Repository?
Christian Zenker
christian.zenker at 599media.de
Tue Jul 14 19:38:01 CEST 2009
Hi everyone.
I played around with extbase for some days now. It's an interesting new
way for extension writing, but sometimes it's also confusing.
Nevertheless: Great work everyone who spent his/her time.
There is one point where I'm stuck right now:
1) I write an extension with the simple task to display entries from a
database. What seems to cause problems is an MM-relation in the database.
Could it be, that extbase isn't supporting this at the moment (got the
version from TYPO3 4.3-dev some days ago)?
As I'm not *that* experienced in TYPO3 (yet), it might also be my fault.
If it helps I could post some parts of the TCA.
The error I get is
NO entry in the $TCA-array for the table "". This means that the
function enableFields() is called with an invalid table name as argument.
Backtracing the error revealt, that
Tx_Extbase_Persistence_Mapper_ObjectRelationalMapper::fetch() caused the
error when calling
$GLOBALS['TSFE']->sys_page->enableFields($dataMap->getTableName()) because
the $className is empty. (the TODO underneath made me suppose that it
might not be my fault :) ) The database field processed by then was
Tx_Extbase_Persistence_Mapper_ColumnMap Object
(
[propertyName:protected] => category
[columnName:protected] => category
[typeOfRelation:protected] => 3
[typeOfValue:protected] => 1
[childClassName:protected] =>
[childTableName:protected] => tx_fiproductdisplay_domain_model_category
[childTableWhere:protected] =>
[childSortByFieldName:protected] =>
[relationTableName:protected] =>
tx_fiproductdisplay_product_category_mm
[parentKeyFieldName:protected] =>
[parentTableFieldName:protected] =>
)
Is there any way to get around this by now?
2) The second question is less of a problem, but a theoretical question.
I created a ProductRepository class in my extension (as far as I
understand, this is what handles the db-queries). Like blog_example this
class extends Tx_Extbase_Persistence_Repository. If I got it right, this
class also checks for changes of the returned objects. But I don't need
this functionality, because changes are only made from the backend. So I
think it's an overkill to my task. Is there any other base class I could
extend for this more simple purpose?
Thanks for your help.
Christian.
More information about the TYPO3-project-typo3v4mvc
mailing list