We have an entity, for example:
@Entity public class User {...}
and USERS table
id, name, email, password, roleId
in class we just started
int id String name String email
Is it possible to get an object like this:
List<User> users = session.createQuery("from User where roleid=2").list()?
those. roleId is a field in the table, but it is not in Entity. Tell me, people! Thank.