ajax-datatables-rails icon indicating copy to clipboard operation
ajax-datatables-rails copied to clipboard

Searching not working against bigint

Open uu opened this issue 6 years ago • 1 comments
trafficstars

If column is bigint, then datatable considers it a string. Empty string.

@view_columns ||= {barcode: { source: 'Product.barcode', cond: :eq, orderable: false }}

barcode = 123123123

SELECT  "products".* FROM "products" WHERE "products"."barcode" = 123123123

barcode = 96749800858

SELECT  "products".* FROM "products" WHERE CAST("products"."barcode" AS VARCHAR) ILIKE ''

uu avatar Aug 05 '19 12:08 uu

Has anyone figured out a solution to this? 3 years later and it's still a problem. Rails uses bigint for primary keys by default when creating a table so this seems like a pretty major issue.

snex avatar Nov 14 '22 20:11 snex