Add better handling of model id handling in ParserDomain (#464)
Add better handling of model id handling in ParserDomain (#464)

* Add better handling of model id handling in ParserDomain

* Code review changes

* Remove unnecessary check

* Redo it a cleaner way

* Fix typo

* Return id for objects in toArray

tmlpstats/tmlpstats,rlorenzo/tmlpstats,rlorenzo/tmlpstats,tmlpstats/tmlpstats,tmlpstats/tmlpstats,rlorenzo/tmlpstats,tmlpstats/tmlpstats,rlorenzo/tmlpstats,rlorenzo/tmlpstats