I have below query to update and after I use cmd to generate file, I got error.
I don't know why but I used this query in Room Database and it's ok
ERROR
The parameter newUsersJoined should be referenced like a list (x IN (:newUsersJoined)) Change the type of newUsersJoined to not be a List<> orreference it with IN (:newUsersJoined) (including the parentheses).
QUERY
@Query('UPDATE spaces_table '
'SET '
'ownedBy = :newOwnedBy, '
'secondUserId = CASE WHEN :newSecondUserId IS NOT NULL THEN :newSecondUserId ELSE secondUserId END, '
'avatar = :newAvatar, '
'name = :newName,'
'username = CASE WHEN :newUsername IS NOT NULL THEN :newUsername ELSE username END, '
'type = :newType, '
'isTurnOffNotification = :newIsTurnOffNotification, '
'usersJoined = :newUsersJoined '
'WHERE id = :spaceId')
Future<int?> updateSpace(
String spaceId,
String newOwnedBy,
String newSecondUserId,
String newAvatar,
String newName,
String newUsername,
String newType,
int newIsTurnOffNotification,
List<UserJoinedEntity> newUsersJoined,
);
I have below query to update and after I use cmd to generate file, I got error. I don't know why but I used this query in Room Database and it's ok
ERROR
QUERY