attach
Device
To
User
@Modifying(clearAutomatically = true
)
@Query(value = "INSERT INTO " + USER_DEVICES_KEY + " (" +
IDENTIFIER_KEY + "," +
USER_IDENTIFIER_KEY + "," +
DEVICE_IDENTIFIER_KEY
+ ") VALUES (" +
":" + SESSION_IDENTIFIER_KEY + "," +
":" + USER_IDENTIFIER_KEY + "," +
":" + DEVICE_IDENTIFIER_KEY
+ ")",
nativeQuery = true
)
Query used to attach a device to a user
Parameters
sessionId
The identifier of the session
userId
The identifier of the user
deviceId
The identifier of the device