0

im new on hibernate, and im trying to get the results of a query, if i try to get only 1 column, i dont have problems, but when i try to get more, i cant. If someone can help me, would be great :D

the code:

        sSelect = sessionFactory.openSession();

        q1 = sSelect.createQuery("select nompro, suelpro from profesores pf order by pf.id");

        //Guarda la información en una lista.
        listaProf = (List) q1.list();

        System.out.println();
        System.out.println();
        System.out.println("Nombre de los Profesores");


        
        for(int i=0; i < listaProf.size(); i++)
        {
            System.out.println(listaProf.get(i).toString());
        }

        sSelect.close(); //Cerramos la sesión

the result: [Ljava.lang.Object;@1816e24a

[Ljava.lang.Object;@6940f685

[Ljava.lang.Object;@47b179d7

0 Answers0