     ###
     fetchSubModel: (model, prop) ->
 
-        typeInfo = model.constructor.properties[prop]
+        typeInfo = model.getTypeInfo(prop)
 
         idPropName = typeInfo.idPropName
 

    ###
    setValueToModel: (model, prop, value) ->

        typeInfo = model.constructor.properties[prop]

        switch typeInfo?.name

            when 'MODELS'
                if Array.isArray value
                    @setSubModelArrToModel(model, prop, value)
                else
                    model.setNonModelProp(prop, value)

            when 'MODEL'
                @setSubModelToModel(model, prop, value)

    ###
    setSubModelToModel: (model, prop, value) ->

        subModelName = model.getTypeInfo(prop).model

        useAnonymousFactory = on # if no factory is declared, altered one is used 
        subModelFactory = @getFacade().createFactory(subModelName, useAnonymousFactory)
