changeMemberRole
@Modifying(clearAutomatically = true)
@Query(value = ""UPDATE " + MEMBERS_KEY + " SET " +
TEAM_ROLE_KEY + "=" + ":#{#" + TEAM_ROLE_KEY + ".name()}" +
" WHERE " + OWNER_KEY + "=:" + OWNER_KEY
+ " AND " + TEAM_IDENTIFIER_KEY + "=:" + TEAM_IDENTIFIER_KEY", nativeQuery = true)
Method to execute the query to change a role of a member
Parameters
teamId
: the identifier of the team
member
: the member to change the role
role
: the role of the member to set