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
Create fields with {reserver_name}_ for example, schema_ for the above case, and use Pyndantic aliases.
Alternatives
Create a custom generator.py, but run into problems:
Creating the dmmf needs the generator's class _on_request to be overridden (assumed to be part of the internal API)
To enable accept the {reserver_name}_ to {real column} looks like the substitution could go in the class QueryBuilder.get_default_fields, but then again, seems to be part of the internal API, not meant for override.
Additional context
In my use case, the schema file is coming from a TypeScript project and I want to keep compatibility with it without changing the file.
The text was updated successfully, but these errors were encountered:
Problem
Currently, using a schema like the one bellow will trigger the generator's default dmmf validation preventing using the name
schema
.When running
poetry run prisma push
Suggested solution
Create fields with
{reserver_name}_
for example,schema_
for the above case, and use Pyndantic aliases.Alternatives
Create a custom generator.py, but run into problems:
{reserver_name}_
to{real column}
looks like the substitution could go in the classQueryBuilder.get_default_fields
, but then again, seems to be part of the internal API, not meant for override.Additional context
In my use case, the schema file is coming from a TypeScript project and I want to keep compatibility with it without changing the file.
The text was updated successfully, but these errors were encountered: