diff options
author | desperateCoder <echotodevnull@gmail.com> | 2020-07-27 12:56:01 +0300 |
---|---|---|
committer | desperateCoder <echotodevnull@gmail.com> | 2020-07-27 12:56:01 +0300 |
commit | 15981e30ebf799b6a7a11cc44de08196661632f4 (patch) | |
tree | ea8ee2c32bcbfaaf5b08e112aaf1c3405b15e340 /app/src | |
parent | 27451b4a5042999e1e3e577db47753ce3075f078 (diff) |
fix first stack creation
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/StackDao.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/StackDao.java b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/StackDao.java index f9d2656ed..feb7e453b 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/StackDao.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/StackDao.java @@ -53,6 +53,6 @@ public interface StackDao extends GenericDao<Stack> { @Query("SELECT localId FROM stack s WHERE accountId = :accountId and id = :stackId") Long getLocalStackIdByRemoteStackIdDirectly(long accountId, Long stackId); - @Query("SELECT max(`order`) FROM stack s WHERE boardId = :localBoardId") + @Query("SELECT coalesce(MAX(`order`), -1) FROM stack s WHERE boardId = :localBoardId") Integer getHighestStackOrderInBoard(long localBoardId); }
\ No newline at end of file |