I have 4 columns in a table. The columns are "water", "fire", "earth" and "wind".
I want to read those 4 columns and put them in an elements array, called whiteCards (of size 4).
Accomplishing it was easy using MySQL queries, but I'm not too sure how to do it with Hibernate.
My class has the field private int[] whiteCards; and the following getter/setter:
@Column(name = "white_cards")
public int[] getWhiteCards() {
return whiteCards;
}
public void setWhiteCards(int[] whiteCards) {
this.whiteCards = whiteCards;
}
I'm pretty sure the @Column(name = "white_cards") is wrong, but I'm not sure what to change it to.
How can I accomplish this? Thanks.