fixed issue in wrapper generation when a TSQLRecord value inherits from a model class
(may be the case e.g. when the group record inherit from TSQLAuthGroup)