Hello,
After browsing the forum and googling for few hours, I didn't find any help about using interface with Hibernate and annotation.
I use Hibernate3.1-rc2, hibernate-annotations-3.1beta6 and postgresql-8.0-314.jdbc3
I try this small exemple before starting a bigger project :
Code:
@Entity
@Inheritance(
strategy=InheritanceType.TABLE_PER_CLASS
)
public interface Animals {
@Id(generate= GeneratorType.AUTO)
public long getEmail();
public void setEmail(long tt);
public long getLongeur();
public void setLongeur(long tt);
}
Code:
@Entity
@Entity
@Inheritance(
discriminatorValue="Dog")
public class Dog implements Animals{ //implements Serializable{
private long email;
private long longeur;
public long getEmail() {
return email;
}
public void setEmail(long email) {
this.email = email;
}
public long getLongeur() {
return longeur;
}
public void setLongeur(long longeur) {
this.longeur = longeur;
}
}
I believe it's not the right syntax for interface inheritance.
Is there some one who already use annotation with interface.
Thanks