[jboss-user] [EJB 3.0] - Hibernate example fails to compile

alavoor do-not-reply at jboss.com
Fri Jul 21 14:25:16 EDT 2006


I downloaded the example package of hibernate from
http://caveatemptor.hibernate.org

And when I tried to compile I get these errors in BankAccount.java file :

The annotation @JoinColumn is disallowed for this location

The attribute access is undefined for the annotation type Entity

The code in the java file is:

@Entity(access = AccessType.FIELD)
@Table(name = "BANK_ACCOUNT")
@JoinColumn(name = "BANK_ACCOUNT_ID")
public class BankAccount extends BillingDetails {

@Column(name = "BA_NUMBER", nullable = false, updatable = false)
private String number;

@Column(name = "BA_NAME", nullable = false, updatable = false)
private String bankName;
...... snip-->
}

What is wrong ?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959998#3959998

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959998



More information about the jboss-user mailing list