Hibernate version: 3.0RC
Mapping documents:none - using annotations
Hello,
First, sorry if this question was already posted, I did not find any help before sending this new post.
I am using Eclipse3.1M5 + jdk1.5 (under WindowsXP) and I would like to test the new annotations'extension. I have a Java project which contains the Hibernate 3.0RC jars + the two jars provided with the Hibernate-annotations-3.0-alpha-3.zip (hibernate-annotations.jar and ejb-3.0-edr1.jar).
When I simply copy/paste the following sample code from the hibernate annotations' page (
http://annotations.hibernate.org)
Code:
@Entity(access = AccessType.FIELD)
public class Customer implements Serializable {
@Id;
Long id;
String firstName;
String lastName;
Date birthday;
@Transient
Integer age;
@Dependent
private Address homeAddress;
@OneToMany(cascade=CascadeType.ALL")
@JoinColumn(name="CUSTOMER_ID")
Set<Order> orders;
// Getter/setter and business methods
}
I have many errors in my workspace saying that the annotations cannot be resolved.
Is there any specific feature to activate or is Eclipse3.1M5 (using sun's jdk 1.5) not abe to compile annotations ?
Thank you in advance
Xavier.