You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When I try to use a uint taken from a unit64 as a user ID in UserHasAnyRoles(id, "admin"), I get the following error:
/go/pkg/mod/github.com/!permify/permify-gorm@v1.0.0/repositories/userRepository.go:199 failed to encode args[0]: unable to encode 0xe40e81495b2643ba into binary format for int8 (OID 20): 16433214242383348666 is greater than maximum value for int64
[0.643ms] [rows:0] SELECT count(*) FROM "user_roles" WHERE user_roles.user_id = 16433214242383348666 AND user_roles.role_id IN (1)
Expected behavior UserHasAnyRoles should work since the PG DB column is BIGINT which is 64 bits in size and my code produces a uint based on a 64bit integer.
Additional context
Add any other context about the problem here.
Environment (please complete the following information, because it helps us investigate better):
I'm using golang:1.20.3-alpine3.17 Docker image
The text was updated successfully, but these errors were encountered:
Describe the bug
When I try to use a
uint
taken from aunit64
as a user ID inUserHasAnyRoles(id, "admin")
, I get the following error:Versions
Permify-gorm version: 1.0.0
Go version: 1.20
Gorm version: v1.25.0
Database driver name: gorm.io/driver/postgres v1.5.2
Database version: 15.3
To Reproduce
Steps to reproduce the behavior:
Expected behavior
UserHasAnyRoles
should work since the PG DB column isBIGINT
which is 64 bits in size and my code produces auint
based on a 64bit integer.Additional context
Add any other context about the problem here.
Environment (please complete the following information, because it helps us investigate better):
I'm using
golang:1.20.3-alpine3.17
Docker imageThe text was updated successfully, but these errors were encountered: