You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to fetch the parent hierarchy of a given Department with the query below. Probably this is something GreenRobot can't handle. Is there any alternatives to run a pure SQL query in this library?
mDaoSession.getPlaceDepartmentItemDao().queryRawCreate("" +
";WITH CTE AS " +
"(" +
"SELECT a.PID, a.ID, a.LEVEL, a.NAME " +
"FROM PLACE_DEPARTMENT_ITEM a " +
" WHERE ID = ?" +
"UNION ALL " +
"SELECT a.PID, a.ID, a.LEVEL, a.NAME " +
"FROM PLACE_DEPARTMENT_ITEM a " +
"JOIN cte c ON c.PID = a.ID" +
")" +
"SELECT * FROM CTE ORDER BY CTE.LEVEL DESC", departmentId)
.list();
GreenDao throws the following exception:
java.lang.IllegalArgumentException: Cannot bind argument at index 1 because the index is out of range. The statement has 0 parameters.
The text was updated successfully, but these errors were encountered:
I'm trying to fetch the parent hierarchy of a given Department with the query below. Probably this is something GreenRobot can't handle. Is there any alternatives to run a pure
SQL
query in this library?GreenDao throws the following exception:
The text was updated successfully, but these errors were encountered: