             else
                 null
         else
-            @model[@props.name]
+            value
 
     getCurrentSelection: ->
         if @props.getSelection

        setSelection: React.PropTypes.func
        displayLimit: React.PropTypes.number
        syncOptions:  React.PropTypes.any

    dataObjects:
        collection: ->
            @props.collection || (
                @props.model?.associations.collectionFor(@props.name, @props.model)
            )

    onChange: (selection) ->
        return unless  _.isString(selection)
        order = @props.queryOrder || { "#{@props.labelField}": 'desc' }
        options = { limit: @props.displayLimit, order}
        unless _.isEmpty(selection)
            options.query = {
                "#{@props.labelField}": { op: 'like', value: selection }
            }

        @collection.fetch(options)

    onSelect: (selections) ->
        selections = [selections] unless _.isArray(selections)
        records = _.map selections, (selection) =>
            @collection.get(selection.id)

        true

    getCurrentModel: ->
        value = @model[@props.name]
        return null unless value

        if not @props.multi and value.isNew()
            pk = @model.associations.pk(@props.name)
            id = @model[pk]
            if id
