converting bigint
When getting the session, I am encountering a problem that the json that contains the user and the session cannot convert because both are bigint. Is there a solution for this?
Solution:Jump to solution
I just added this to the main backend file and it works
```ts
declare global {
interface BigInt {
toJSON(): string...
6 Replies
In the database, I made the ID a bigint and in databaseHooks I replace the string generated by the library with a bigint
There isn't a official support for custom IDs just yet. So for now we'll just have to see if we can find some workarounds for this to work. What Database adapter are you using?
drizzle
Solution
I just added this to the main backend file and it works
is it enough or do it differently?
Hmm yeah I guess so.
noice, I'm closing and waiting for an update