Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

121
Views
Reading 4 columns into one array in Hibernate

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.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!