Inferring additional fields on hooks

The additional field role is not found inside the databasehooks.

I ran better-auth/cli generate and prisma migrate as you can see the screenshot from the prisma studio , the user table have that column.

I also tried restarting the TS server on vscode which did not solve the issue
image.png
image.png
Solution
Hey guys ( @aswnss, @Rufis ), this is a known limitation of Better-auth.
However I do have a PR which fixes this. Once merged your issue will be resolved.
You can track the PR here:
https://github.com/better-auth/better-auth/pull/2158
GitHub
We now infer models based on the options:

Previously:


How?
The betterAuth function now has generics for plugins, as well as any model data that could be modified by options, such as User additio...
Was this page helpful?