Relationship values may be saved with the wrong order
See original GitHub issueFollowing on from #1359, and @mitchellhamilton’s comment regarding this API suggestion from @jesstelford:
return {
disconnectAll: true,
connect: ids.map(id => ({ id })),
};
Just tried that and it changes the order of the items which would probably be really confusing for users
Since that API is currently our recommended way of “setting” the value of a relationship field, we should ensure it works as expected and saves the items in the given order
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
How to Know If Your Relationship Is Worth Saving
If you both believe the relationship is worth saving, then you'll equally put in the work. Communication is the foundation of every relationship ......
Read more >How to save a relationship and also know when to let go
Although optimism always gets a gold star, the truth is that not all relationships are meant to be saved. Before deciding how you'll...
Read more >10 Core Values of a Lasting Relationship - Lifehack
Similar core beliefs are fundamental for you and your partner in order to feel safe, protected, connected, and comfortable, to name but a...
Read more >11 Core Relationship Values Every Couple Must Have
For example, marriage core values, such as respect and forgiveness, when shared among partners, can be of immense help in conflict management.
Read more >How to Avoid the Pursuer-Distancer Pattern in Your Relationship
Dr. Lerner points out the importance of recognizing that neither pattern is wrong. In a normal relationship, we may actually take turns adopting...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Have any decisions been made on this? I have a scenario where I am trying to create a Playlist. In this scenario the order is everything.
Hi, I landed at this issue after initially setting up keystone and going through the getting started tutorial. After some instant success I am now stuck on exactly this issue.
This thread (https://stackoverflow.com/questions/66034621/keystonejs-user-defined-order-for-relationship) talks about using another intermediate list: make a list to describe the sorting order of the relation between two other lists (many to many). This however feels awkward and I would like to ask if this is still the only way to get sorting order within relationships?
I would prefer not to add a hook or some hacky SQL to reach my goal.