         this.dt_api = this.dataTable.api()
         this
 
-    buildModels: (d)->
+    buildQuery: (d)->
         params = {
             o: {}, s: d.start, l: d.length||100, df:'array',
-            f: ['id'].concat(_.pluck(@columnDefinitions, 'field'))
+            f: ['id'].concat(_.pluck(@columnDefinitions, 'id'))
         }
         if ! _.isEmpty( query = @recordQuery.asParams() )
             params['q']=query
         for order in d.order
             column = @recordQuery.fields.at(order.column)
-            params['o'][column.field] = order.dir
+            params['o'][column.id] = order.dir
         params
 
 

            oScroller: { loadingIndicator: true }
            ajax:
                url: @recordQuery.url + ".json"
                data: (d)=>@buildModels(d)
                dataSrc: (d)->
                    d.recordsFiltered = d.recordsTotal = d.total
                    row.DT_RowId = row.shift() for row in d.data

        align = switch query_field.type
            when 'integer','bigdec' then 'r'
            else 'l'
        { title: query_field.title, id: query_field.id, className: align, "targets": [ index ] }

    _dataFromModel: (model)->
        data = []
        for field,i in @columnDefinitions
            data.push( model.get(field.id) || '' )
        data
