Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

122
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda