Mysql returning a record but HQL not returning any record for the same query.
String strQuery = "select m.matchId,m.status,m.startTime,m.mustPlayBy from Match m ,MatchUsers u where u.userEmail = '" + email +"' and u.matchId = m.matchId"; List<Match> matches = ((List<Match>)session.createQuery( strQuery ).list());
returning EMPTY List but if execute the sql query SELECT * FROM videogame.match m , videogame.match_users u where m.id_match=u.match_id AND u.user_email='test@test.com '; in mysql workbench its returning a record.
what could be the reason ?
|