Few more things to look for -
1) what does QList<CMerchandizeOrder*> orders=shoppingCartModel()->orders(); do ??

2) in while(query.next()) , how many times is it executed ??

3) whats the full code in addEntry ??

my guess is thers prob in addEntry function only. Because thats where you were creating the CMerchandizeOrder objects.

add some debugging in addEntry. Before and after u create the CMerchandizeOrder object.

By the way,,, code is going into constructors isnt it