removed explicit SQL calls in Model_StockHistory class