[TYPO3-irre] create and select from both sides.
Nikolas Hagelstein
hagelstein at shr.cc
Thu Aug 6 16:08:35 CEST 2009
Hi,
I got 2 tables A and B
A <- 1/n -> B
For A i got the following TCA configuration:
'bs' => array(
...
'config' => array(
'type' => 'inline',
'foreign_class' => 'Tx_Myext_Domain_Model_B',
'foreign_table' => 'tx_myext_domain_model_b',
'foreign_field' => 'a_uid',
'foreign_table_field' => 'a_table',
)
)
(nevermind the foreign_class key it's extbase related).
For b I got the following:
...
'a_uid' => array(
'config' => array(
'type' => 'passthrough'
)
),
'a_table' => array(
'config' => array(
'type' => 'passthrough'
)
)
...
That far that good. Now I am able to create new b's for a's and they are
related to it. What I need is a way to assign already existing B's to
A's.
I played around using foreign_selector but it seems to be preserved for
m/n relations using intermediate tables.
I also thought about changing a_uid to a select field but how to ensure
that a_tables is update correctly if I'd assign a b this way?
Any hints?
Cheers,
Nikolas
More information about the TYPO3-project-irre
mailing list