         @definitions = @klass::associations
         @definitions['created_by'] ||= { model: 'Lanes.Models.User', readOnly: true }
         @definitions['updated_by'] ||= { model: 'Lanes.Models.User', readOnly: true }
+        @collections = {}
         for name, options of @definitions
             @klass::derived[name] = this.derivedDefinition(name, options)
 

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

    setFromServer: (model, data) ->

        options.filter ||= {}
        options.filter[fk] = this.get(pk)

        if true == target_class::isCollection
            new target_class(options.models || [], options)
        else
            options.model = target_class
