find All By Token
@Query(value = "
SELECT *
FROM notification
WHERE user_id = (SELECT user_id
FROM "user"
WHERE token = :token)
", countQuery = "
SELECT count(*)
FROM notification
WHERE user_id = (SELECT user_id
FROM "user"
WHERE token = :token);
", nativeQuery = true )
Returns all notification for a particular user token with pagination
Parameters
token
user token
@Query(value = "
SELECT *
FROM notification
WHERE user_id = (SELECT user_id
FROM "user"
WHERE token = :token)
order by "date" DESC;
", nativeQuery = true )
Returns all notification for a particular user token
Parameters
token
user token