the general problem/question which I'm trying to solve using the
iterator method:  what's the correct/optimal way of inserting records into
tables linked with a relational table.

Doing it the way below seems unreasonablly slow. Too much Reactor overhead:

                <cfset Reactor = CreateObject("Component",
"reactor.reactorFactory").init("/var/www/html/reactor/reactor.xml") />

                
                        
                        <!----------------------------
                        ==============================
                        PHOTO INSERT
                        ==============================
                        ----------------------------->  
                        
                        <!--- create a record --->
                        <cfset My_Photos_Record = 
Reactor.createRecord("Photos") />

                        <!--- populate the new record --->
                        
                        <cfset 
My_Photos_Record.SETPhoto_Name("#arguments.Photo_Name)") />

                        <!--- save the record --->
                        <cfset My_Photos_Record.save() />

                        <cfset inserted_id_photos = 
My_Photos_Record.GETEVENT_PHOTO_ID()>
                        
                        
                        <!----------------------------
                        ==============================
                        FOOTPRINT INSERT
                        ==============================
                        ----------------------------->  

                        <!--- create a record --->
                        <cfset Footprints_Record = 
Reactor.createRecord("Footprints") />

                        <!--- populate the new record --->
                        <cfset 
Footprints_Record.SETEVENT_TOKEN_ID("#arguments.BARCODE_ID#")>

                        <!--- save the record --->
                        <cfset Footprints_Record.save() />

                        <Cfset inserted_id_footprints_loc = 
Footprints_Record.GETFOOTPRINT_ID()>
                
                        <!------------------------
                        ==========================
                        R_FOOTPRINT_PHOTO INSERT
                        ==========================
                         ------------------------>      

                        <!--- create a Record --->
                        <cfset R_Footprint_Photo_Record =
Reactor.createRecord("R_Footprint_Photo") />

                        <!--- populate the new record --->
                                <cfset 
R_Footprint_Photo_Record.SETEVENT_PHOTO_ID("#inserted_id_photos#") />
                        <cfset  
R_Footprint_Photo_Record.SETFOOTPRINT_ID("#inserted_id_footprints_loc#")
/>
                
                        <!--- save the record --->
                        <cfset R_Footprint_Photo_Record.save() />



-- Reactor for ColdFusion Mailing List -- [email protected]
-- Archives at http://www.mail-archive.com/reactor%40doughughes.net/


Reply via email to