-
Notifications
You must be signed in to change notification settings - Fork 538
Open
Labels
bugSomething isn't workingSomething isn't workinghas workaroundIssue has a valid workaround.Issue has a valid workaround.postgrest-jsRelated to the postgrest-js library.Related to the postgrest-js library.
Description
Bug report
- I confirm this is a bug with Supabase, not with my own application.
- I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
When calling a select query after using the update option with an external key, the limit does not work correctly. An error "A 'limit' was applied without an explicit 'order'" is returned. After adding an additional order, the limit is not applied at all. The problem does not occur when using select alone.
Example of implementation:
supabase
.from('home')
.update(home)
.eq('id', home.id)
.select('id, image(url)')
.limit(1, { foreignTable: 'image' }) // FIX-ME: This is not working;
It is a combination of one to many one house can have many images. As a result, we want to get only one instead of a list of all.
To Reproduce
Steps to reproduce the behavior:
- Create two arrays in which one has a key to the other with an external key using a one-to-many relationship.
- Creation of any elements
- Calling update query from library and then select with external key and limit constraint
Expected behavior
The result should be the same as for select called separately.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghas workaroundIssue has a valid workaround.Issue has a valid workaround.postgrest-jsRelated to the postgrest-js library.Related to the postgrest-js library.