3093 Posts in 875 Topics by 654 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 368 Views |
-
Adding multiple dataobjects with many_many_extraFields to componentset

11 December 2011 at 4:20am Last edited: 11 December 2011 4:27am
Hi all,
I'm trying to figure out the most efficient way of adding multiple dataobjects to a componentset - addMany() would work perfectly except there doesn't seem to be the option of including many_many_extraFields data along with the ID array.
Does anyone know of any way this can be done without having to loop through each dataobject and use add()? I'm looking to loop across thousands of records at a time, so efficiency is the most important factor here.
I suppose a batch insert with addMany() could be followed by some sort of batch update, if such a thing exists?
Cheers!
-
Re: Adding multiple dataobjects with many_many_extraFields to componentset

11 December 2011 at 6:44am
So it seems after a bit of digging through Sapphire's core, addMany() is simply a shorthand foreach add() loop, so probably won't help efficiency much.
Perhaps looping through each dataobject and building a manual SQL command to execute at the end of the loop is the simplest answer here ...
| 368 Views | ||
|
Page:
1
|
Go to Top |

