change Member Role

@Modifying(clearAutomatically = true )
@Query(value = ""UPDATE " + GROUP_MEMBERS_TABLE + " SET " + MEMBER_ROLE_KEY + "=" + ":#{#" + MEMBER_ROLE_KEY + ".name()}" + " WHERE " + GROUP_MEMBER_KEY + "=:" + GROUP_MEMBER_KEY + " AND " + IDENTIFIER_KEY + "=:" + IDENTIFIER_KEY", nativeQuery = true )
abstract fun changeMemberRole(@Param(value = "id") memberId: String, @Param(value = "group_member") groupId: String, @Param(value = "role") role: Role)

Method to execute the query to change the role of a group member

Parameters

memberId

: the member identifier

groupId

: the group identifier

role

: the role of the member