Fixed the issue in which the recursion for normal rdbms results was put into recursion Which was a CI::DBresult and hence was iterating for each propery causing error