[TYPO3-mvc] Question about relations
Kai
kai.tallafus at gmx.at
Mon Mar 15 16:04:43 CET 2010
Hi all,
I am building a small shop with extbase. Despite of paying a product with money, the customer can redeem sort of bonus points and and pay with them.
The price of a product is composed of multiple "bonus point units", let´s call them "BonusDollars". So if a product costs 110 bonus points the price is composed of 50 BonusDollars + 50 BonusDollars + 10 BonusDollars. (Each of them are displayed as coin icons in the shop)
So we have the following structure: product HAS MANY bonusdollars
To add the same units multiple times, I defined it as select with 'multiple' => '1':
'price' => array(
'exclude' => 0,
'label' => 'LLL:EXT:colteneshop/Resources/Private/Language/locallang_db.xml:tx_myshop_domain_model_product.price',
'config' => array(
'type' => 'select',
'foreign_table' => 'tx_myshop_domain_model_bonusdollar',
'maxitems' => 9999,
'size' => '5',
'multiple' => '1',
)
),
My problem is how extbase collects the data for the related dollars during the mapping process.
For a product which has 50 + 50 + 10 dollars i only get the relations for 50 and 10. As far as I can see this is due the fact that relations are fetched with a single sql statement like SELECT ... FROM table WHERE uid IN (...).
Do I miss something or is there currently no solution for this?
Btw. extbase is fun :-)
Greets
Kai
More information about the TYPO3-project-typo3v4mvc
mailing list