From 35d94bacc2d15d86998d903246a2e9adc9fd63c4 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sat, 30 Jan 2021 15:08:42 +0200 Subject: [PATCH] Room doesn't understand "NULLS FIRST" in the ORDER BY clause :( --- .../main/java/net/ktnx/mobileledger/dao/PatternHeaderDAO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/dao/PatternHeaderDAO.java b/app/src/main/java/net/ktnx/mobileledger/dao/PatternHeaderDAO.java index 43f688aa..a8ef1533 100644 --- a/app/src/main/java/net/ktnx/mobileledger/dao/PatternHeaderDAO.java +++ b/app/src/main/java/net/ktnx/mobileledger/dao/PatternHeaderDAO.java @@ -42,7 +42,7 @@ public interface PatternHeaderDAO { @Delete void delete(PatternHeader item); - @Query("SELECT * FROM patterns ORDER BY UPPER(name) NULLS FIRST") + @Query("SELECT * FROM patterns ORDER BY UPPER(name)") LiveData> getPatterns(); @Query("SELECT * FROM patterns WHERE id = :id") -- 2.39.5