-
Notifications
You must be signed in to change notification settings - Fork 8
Description
dialects/postgres.parser.ts assigns a type of 'number' to 'bigint' column types in the getColumnType switch. here
adminjs/src/utils/param-converter/convert-param.ts then references this 'number' type and converts the value to a Number() which loses precision. here
Returning 'bigint' for case 'bigint' at least allows the value to remain a string and maintain precision with the current convert-param.ts, but I suppose a conversion to BigInt() would be possible there.
This is breaking show and edit actions with bigint id columns that lose precision and query the wrong id.
As a way around this, I attempted to define bigint resource id properties as type: 'string' in the AdminJS constructor options, but this only fixed the show action. I was hoping that defining the type there might override the type in the Resource, but it doesn't work that way. I'm actually not sure why it does work for the show action.