Fixes undefined function error thrown during model generation with schema provided.
Merge pull request #699 from satyrwilder/master

Fixes undefined function error thrown during model generation with schema