         options.filter ||= {}
         options.filter[fk] = this.get(pk)
 
-        if target_class::isCollection
+        if true == target_class::isCollection
             new target_class(options.models || [], options)
         else
             options.model = target_class

    nonLoaded: (model, names) ->
        list = []
        for name in names
            if _.has(@definitions, name) && model[name].isNew()
                list.push(name)
        list

    set: (model, data) ->
        this._set(model, data, 'set')
        for name, value of data
            if @definitions[name] && Lanes.u.isModel(value) && !value.isNew()
                model[@pk(name)] = if value then value.getId() else null

    setFromServer: (model, data) ->
