SELECT
    availability.id,
    availability.userId,
    availability.startTimestamp,
    availability.endTimestamp,
    availability.comment,
    availability.crossAreal,
    user_.name,
    user_.email,
    user_.password,
    user_.salt,
    user_.role AS "role: Role",
    user_.function AS "function: UserFunction",
    user_.areaId,
    user_.locked,
    user_.lastLogin,
    user_.receiveNotifications
FROM availability
JOIN
    user_ ON availability.userId = user_.id
WHERE
    availability.id = $1;
