insert
Member
@Modifying(clearAutomatically = true
)
@Query(value = "INSERT IGNORE INTO " + GROUP_MEMBERS_TABLE
+ "( "
+ IDENTIFIER_KEY + ","
+ NAME_KEY + ","
+ EMAIL_KEY + ","
+ PROFILE_PIC_KEY + ","
+ SURNAME_KEY + ","
+ MEMBER_ROLE_KEY + ","
+ INVITATION_STATUS_KEY + ","
+ GROUP_MEMBER_KEY + ") VALUES "
+ "( "
+ ":" + IDENTIFIER_KEY + ","
+ ":" + NAME_KEY + ","
+ ":" + EMAIL_KEY + ","
+ ":" + PROFILE_PIC_KEY + ","
+ ":" + SURNAME_KEY + ","
+ ":#{#" + MEMBER_ROLE_KEY + ".name()},"
+ ":#{#" + INVITATION_STATUS_KEY + ".name()},"
+ ":" + GROUP_MEMBER_KEY + ")",
nativeQuery = true
)
Method to execute the query to add a member in a com.tecknobit.pandoro.services.groups.entity.Group
Parameters
memberId
: the identifier of the member to add
name
: the name of the member
email
: the email of the member
profilePic
: the profile pic of the member
surname
: the surname of the member
role
: the role of the member
invitationStatus
: the invitation status of the member
groupId
: the identifier of the group where add the member