fernandroide wrote:
I had a query, but this always return de same data. I do think that it is because in the seriesanio.hbm.xml file I defined a field ID. In fact the id of the table are three fields,.
How can i define the three flields as ID???
This is my code:
<id name="id_indicador" column="ID_INDICADOR" type="java.lang.String" unsaved-value="null">
<generator class="native"/>
</id>
but the id of the table are id_indicador,anio and id_combinacion.
Thanks in advance.
You need a composite key, and override the equals() and hashcode(). There is a good example in the hibernate docs. To be nice, I will even find you a link...
http://www.hibernate.org/hib_docs/refer ... ompositeid
Regards,
Chris