Override « Composite « JPA Q&A





2. Override equals() and hashcode() when using a composite key?    forum.hibernate.org

Hi, I am new to Hibernate and the reference paper does not really help me....at least I am unsure... Here is my concrete example: Table Question question_id (pk) question_text Table Option option id (pk) question_id (pk, fk) option_text ********************** I have modelled this in java with the help of a third class (composite-class), that encapsulates the primary key for Option... ...now ...