fixed update query for stock_relationship when merging stocks