🆘 Field mapping issue with organization plugin: 'userId does not exist in schema for model member
Hello Better Auth community 
I'm having an issue with the organization plugin and field mapping. When trying to create an organization, I get this error:
My setup:
Any help would be appreciated! Thanks!
I'm having an issue with the organization plugin and field mapping. When trying to create an organization, I get this error:
My setup:
- Using Better Auth with Drizzle adapter
- Database fields use snake_case (
user_id,organization_id, etc.) - Organization plugin configured with proper field mappings
- Adding field mappings at the root level in my `betterAuth()` config:```jsmember: {modelName: "member",fields: { userId: "user_id", organizationId: "organization_id", teamId: "team_id"}}```
- Adding schema mappings in the organization plugin config:```jsorganization({// Other options...schema: { member: { fields: { userId: "user_id", organizationId: "organization_id", teamId: "team_id" } }}})```
Any help would be appreciated! Thanks!

