             deps: ['model_field'], fn: ->
                 type = @model_field?.type || 'string'
                 if type == "code" then "string" else type
-        fetchIndex:
-            fn: ->
-                fetchIndex = 0
-                for field, index in this.collection.models
-                    return fetchIndex if this == field
-                    fetchIndex += 1 if field.query
 
     validValue: (value) ->
         if this.type == 'n'

        sortBy:     type: 'any'
        component:  type: 'function'
        onColumnClick: type: 'function'

    derived:
        default_value: deps: ['id'], fn: ->

        )
        super
        @visible = @subcollection(where: {visible: true})
        @calculateFetchIndexes()

    calculateFetchIndexes: ->
        index = 0
        for field in @models
            field.fetchIndex = if field.query then index++ else undefined

class Operator extends Lanes.Models.Base
    registerForPubSub: false
