ajax-datatables-rails
ajax-datatables-rails copied to clipboard
Searching not working against bigint
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 ''
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.