-
-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Describe the feature
Today I specified something as a oneToOne relationship but I thought I had specified it as a one to many relationship. I then inserted a list of items and I got the error:
Uncaught Error: [Pinia ORM] The record is missing the primary key. If you want to persist record without the primary key, please define the primary key field with the `uid` attribute.
Now I realize it probably could not find the id because I passed a list and that list of course does not have an id field. When I finally figured this out I remembered that I have gone through this already before.
Maybe before raising this error there could also be a check to see if the item we are checking the id for is a list. If it is a list there could be a warning like:
Warning: [Pinia ORM] You passed a list into a oneToOne relationship.
Additional information
- Would you be willing to help implement this feature?
- Could this feature be implemented as a module?
Final checks
- Check existing discussions and issues.
CodeDredd
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request