Reputation: 499
I'am studying Hibernate and faced with little problem.
I have a class Item, witch mapped on DB with same columns:
@Entity
class Item {
private long id;
private long hash;
private String name;
// ... constructors/getters/setters ...
}
Hashes(CRC, Adler, nevermind) generated on programm initialization. They can be duplicated for some reason.
Question is: how to get Map < Long, Item >, were key is hash?
Upvotes: 0
Views: 235
Reputation: 2933
What for do you need hash column in this example?
Upvotes: 1