[TYPO3-mvc] IRRE intermediate tables
Jochen Rau
j.rau at web.de
Tue May 5 09:13:09 CEST 2009
Hi Michel,
> I just started to develop my first extbase extension. I got no problem
> implementing some simple models with 1:n relations between them.
Fine.
> However, I am not able to implement a N:N relation. For this particular
> relation, I do not use the TCA "MM" field. I use an intermediate table
> based on IRRE documentation example. (see
> tx_irretutorial_mnasym_hotel_offer_rel table :
> http://typo3.org/documentation/document-library/extension-manuals/irre_tutorial/0.1.10/view/1/2/)
>
>
> By looking at extbase source code, I think that
> "HAS_AND_BELONGS_TO_MANY" relations can only be created by using the
> "mm" field. Is this really the case?
IRRE will be fully supported as of TYPO3 v4.3beta1.
The naming conventions for mm tables are as follows: Let's assume you
might want to join a table "tx_blogexample_domain_model_blog" holding
Post object data (Tx_BlogExample_Domain_Model_Post) and a table
"tx_blogexample_domain_model_tag" holding Tag object data
(Tx_BlogExample_Domain_Model_Tag). The intermediate table name must be
"tx_blogexample_post_tag_mm". It is "tx" followed by the extension name
(not key!) in lowercase ("blogexample") followed by the last part of the
left table ("post") followed by the last part of the right table ("tag")
followed by "mm". The tables holding the ovject data are simply the
class names in lowercase.
Have a look at the BlogExample. It already works with IRRE.
Regards
Jochen
More information about the TYPO3-project-typo3v4mvc
mailing list