[Organizations] usePlural doesn't work

Hey guys. Im facing this issue and not sure if the problem is on my side.

When I use custom model names for Organization plugin like this:
plugins: [
  organization({
    schema: {
      invitation: {
      modelName: 'organization_invitations'
      },
      member: {
          modelName: 'organization_members'
      },
    }
  }),
]

i get the following error:
Error updating user:  [BetterAuthError: [# Drizzle Adapter]: The model "organization_member" was not found in the schema object. Please pass the schema directly to the adapter options.] {
  cause: undefined
}


Packages
  • drizzle-kit@0.31.1
  • @better-auth/cli@1.2.9
  • better-auth@1.2.9
In this Github Issue i provided mode details and some investigation info - https://github.com/better-auth/better-auth/issues/3069
Was this page helpful?