1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[JBoss] Hibernate saving (inner?) class variables

Discussão em 'StackOverflow' iniciado por Stack, Abril 14, 2025.

  1. Stack

    Stack Membro Participativo

    Not really sure how to word the question, but I'm using Hibernate to store certain variables of my Player class. But, inside that class we have an instance of Appearance that I want to save variables from as well.

    Here's my hibernate.cfg.xml (pastebin) and here is my Player.hbm.xml (pastebin).

    Just to not miss out on anything the SQL (pastebin) for setting up my database ("primaryKey" auto-increments)

    (primaryKey that's stored in Player.java)

    @Id
    @GeneratedValue
    private Long primaryKey;


    The appearance instance:

    private final Appearance appearance = new Appearance();


    The variables inside of Appearance I'm trying to save:

    private int[] styles = new int[]{0, 10, 18, 26, 33, 36, 42};
    private int[] colors = new int[]{2, 5, 8, 11, 14, 0, 0, 0, 0, 0};

    Continue reading...

Compartilhe esta Página