[hibernate-issues] Unable to get the correct ids from the hibernate query results