No way to make this work:
I create an annotated class that uses an Composite key and using hbm2ddl I try to create an sql containing ddl needed.
All tested code works perfectly till now but there's no way to make next one work:
Error given is:
java.lang.NoSuchMethodError: org.hibernate.util.ReflectHelper.isPublic(Ljava/lang/reflect/Member;)Zand code:
Code:
package com.apl.aswir.model.main;
import javax.persistence.EmbeddedId;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Table;
@javax.persistence.Entity
@Table(name = "TEST")
@IdClass(TestId.class)
public class Test {
// @EmbeddedId TestId id;
private Long id1 = null;
private Long id2 = null;
@Id public Long getId1() {
return id1;
}
public void setId1(Long id1) {
this.id1 = id1;
}
@Id public Long getId2() {
return id2;
}
public void setId2(Long id2) {
this.id2 = id2;
}
}
package com.apl.aswir.model.main;
import javax.persistence.Embeddable;
// @Embeddable
public class TestId {
private Long id1 = null;
private Long id2 = null;
public Long getId1() {
return id1;
}
public void setId1(Long id1) {
this.id1 = id1;
}
public Long getId2() {
return id2;
}
public void setId2(Long id2) {
this.id2 = id2;
}
}
I have tested 2 possible combinations:
and both give same error.
any help would be very appreciated
Thanks in advance