In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
578 [In-Portal CMS] Data Management bug report always 2010-02-11 10:40 2010-05-11 03:00
alex  
alex  
normal  
closed 5.0.2  
fixed  
 
none 5.0.3-B1  
http://groups.google.com/group/in-portal-bugs/browse_thread/thread/f2de5b5b5c9fbebb
0
0000578: Foreign key update problem in temp handler
There is foreign key update problem in temp handler. When you create sub-item record in temp table, then kDBItem::setTempID() method is called and temporary (negative) ID is assigned to that item. This is done to prevent ID conflicts, when record will be copied to live table later. When that subitem has it's own sub item, then temporary ID is populated to it as well. Later, when data is copied to live table all temporary IDs in all related tables are replaced with live IDs.

product (top item) <- product option (sub item) <- product option value
(sub-sub-item)

Here sub-sub-item gets incorrect IDs of sub item. However there is bug during foreign key (related temporary IDs) replacement code, when in case if subitem doesn't have ForeignKey (that's product option combinations in in-commerce), then all other subitems are not processed resulting temporary ID is copied intact in live table.
related to 0000580closed  (5.1.1)Dmitry Issues with change log section 
patch foreign_key_update_problem.patch (665) 2010-02-11 10:40
http://tracker.in-portal.org/file_download.php?file_id=284&type=bug
Issue History
2010-05-11 03:00 alex Note Added: 0002163
2010-05-11 03:00 alex Status resolved => closed
2010-03-11 09:03 alex Note Added: 0001557
2010-03-11 09:03 alex Status reviewed and tested => resolved
2010-03-11 09:03 alex Fixed in Version => 5.0.3-B1
2010-03-11 09:03 alex Resolution open => fixed
2010-03-11 09:03 alex Changeset attached 5.0.x r13202
2010-02-26 16:52 Dmitry Assigned To !COMMUNITY => alex
2010-02-26 16:46 Dmitry Developer => alex
2010-02-24 07:29 alex Relationship added related to 0000580
2010-02-24 07:26 alex Note Added: 0001484
2010-02-24 07:26 alex Status needs testing => reviewed and tested
2010-02-24 07:25 alex Changeset attached 5.1.x r13162
2010-02-24 07:25 alex Note Added: 0001483
2010-02-24 07:25 alex Target Version 5.0.4 => 5.0.3
2010-02-24 07:24 alex Target Version 5.0.3 => 5.0.4
2010-02-11 10:40 Dmitry Note Added: 0001475
2010-02-11 10:40 Dmitry Assigned To => !COMMUNITY
2010-02-11 10:40 Dmitry Status active => needs testing
2010-02-11 10:40 Dmitry Reporter Dmitry => alex
2010-02-11 10:40 Dmitry New Issue
2010-02-11 10:40 Dmitry File Added: foreign_key_update_problem.patch
2010-02-11 10:40 Dmitry Reference => http://groups.google.com/group/in-portal-bugs/browse_thread/thread/f2de5b5b5c9fbebb

Notes
(0001475)
Dmitry   
2010-02-11 10:40   
Patch attached - needs testing
(0001483)
alex   
2010-02-24 07:25   
Mistakenly moved task to other released. Original release version restored.
(0001484)
alex   
2010-02-24 07:26   
Tested.
(0001557)
alex   
2010-03-11 09:03   
Fix committed to 5.0.x branch. Commit Message:

Fixes 0000578: Foreign key update problem in temp handler
(0002163)
alex   
2010-05-11 03:00   
Closing all tasks from released versions.