There is a request
SELECT * FROM [std].[dbo].[StudentProfile] A LEFT JOIN [std].[dbo].[User] U ON A.[StudentID] = U.[UserID] WHERE U.Usermail = 'a@a.com'
I did not find or did not understand how to create the right criteria
Criteria criteria = session.createCriteria(StudentProfile.class); criteria.createAlias("user", "User"); criteria.add(Restrictions.like("user.usermail", params.getEmail()));
here on the 2nd line crashes. maybe who knows how to make correctly?