     @method addRelatedModels
     ###
     addRelatedModels: (prop, submodels...) ->
-        @assertSubModelProp(prop, 'addRelatedModels')
 
         typeInfo = @constructor.properties[prop]
         modelName = typeInfo.model

            return @



    ###*
    assert given prop is model prop

    @method assertSubModelProp
    @private
    ###
    assertSubModelProp: (prop, method) ->

        typeInfo = @constructor.properties[prop]

        if not typeInfo? or not typeInfo.model
            throw @getFacade().error """
                #{@constructor.name}.#{method}(#{prop})
                #{prop} is not a prop for model.
            """

    @getModelName: ->
        @name.replace(/([A-Z])/g, (st)-> '-' + st.charAt(0).toLowerCase()).slice(1)


    @method setRelatedModels
    ###
    unsetRelatedModel: (prop) ->

        typeInfo = @constructor.properties[prop]
        modelName = typeInfo.model
