I have an entry as follow:
@Entity
@Table(name="rank")
class Rank implements Serializable {
private int id;
private int rank_id;
private date creationDate;
...
// getters\setters...
}
I would like to query this table and put the results into a HashMap! as follow:
Map<Integer, Rank> = session.createSQL("select new map...").list();
Is this possible to put the entity as the value of the map?
Can I get a code example?