0 Replies Latest reply on Jul 21, 2006 2:22 PM by alavoor

    Hibernate example fails to compile

    alavoor

      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 ?