mattiascrofani
03/09/2018, 11:18 AM(AccessToken innerJoin Staff).slice(Staff.id, Staff.userName).select {AccessToken.idStaff eq Staff.id}
AccessToken.join(Staff, JoinType.INNER, AccessToken.idStaff, Staff.id).slice(Staff.id, Staff.userName).select { AccessToken.token eq accessToken }
tapac
03/09/2018, 9:12 PMAccessToken
table has reference to Staff
table, than your first code will also work.
Look here https://github.com/JetBrains/Exposed/wiki/DAO#simple-reference