Open wheelie33 opened 5 months ago
I have a simple table that has 2 columns I care about.
created_at: timestamp (always has a value) read_on: timestamps (null if unread, value if read).
I want to show all unread first, then order the rest by created_at with newest first.
let { data: announcements, error: announcementError } = await supabase .from('announcements') .select('*') .eq('user_id', session?.user.id) .order('read_on', { nullsFirst: true }) .order('created_at', { ascending: true });
That call doesn't seem to change the results at all. Running the 2nd order() by itself works as expected.
Anyone able to reproduce this?
hello?
I can't reproduce, can you share a bit more details so I can set up my db the same way you are? the 2nd order seems to be working as expected for me.
I have a simple table that has 2 columns I care about.
created_at: timestamp (always has a value) read_on: timestamps (null if unread, value if read).
I want to show all unread first, then order the rest by created_at with newest first.
That call doesn't seem to change the results at all. Running the 2nd order() by itself works as expected.