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
If the user creates the model with an id for the primary key name then everything works fine.
Using a different name will result in the following error.
There is also the case that if I don't declare a primary key field, saffier automatically adds the id field as the primary key, which can be confusing for users. Perhaps for this case you could RAISE an error to remind the user to add the primary key, rather than helping the user to do it implicitly.
File "/Users/hulk/miniforge3/envs/py38/lib/python3.8/site-packages/saffier/core/db/models/metaclasses.py", line 251, in __new__
raise ImproperlyConfigured(
saffier.exceptions.ImproperlyConfigured: Cannot create model User with multiple primary keys.
The text was updated successfully, but these errors were encountered:
If the user creates the model with an id for the primary key name then everything works fine. Using a different name will result in the following error.
There is also the case that if I don't declare a primary key field, saffier automatically adds the id field as the primary key, which can be confusing for users. Perhaps for this case you could RAISE an error to remind the user to add the primary key, rather than helping the user to do it implicitly.
File "/Users/hulk/miniforge3/envs/py38/lib/python3.8/site-packages/saffier/core/db/models/metaclasses.py", line 251, in __new__
raise ImproperlyConfigured(
saffier.exceptions.ImproperlyConfigured: Cannot create model User with multiple primary keys.
If the user creates the model with an id for the primary key name then everything works fine.
Using a different name will result in the following error.
There is also the case that if I don't declare a primary key field, saffier automatically adds the id field as the primary key, which can be confusing for users. Perhaps for this case you could RAISE an error to remind the user to add the primary key, rather than helping the user to do it implicitly.
The text was updated successfully, but these errors were encountered: