I am using
3.2.6.ga - also tried 3.3.1.ga and Annotations version
3.4.0.CR2 - also tried 3.4.0.GA.
I have a relatively simple mapping I'm trying to write using a secondary table. The model object is fine before I add the secondary table columns, but once I add them it dies.
e.g.
Code:
@Entity
@Table(name = "CUSTOMER_SERVICE")
@SecondaryTable(name = "PORT_STATUS",
pkJoinColumns = {@PrimaryKeyJoinColumn(name="PORT_ID", referencedColumnName="PORT_ID")} )
public class CustomerService extends ModelObject {
... normal columns working fine ...
@Column(table = "PORT_STATUS", name = "PORT_OPERATIONAL")
public boolean isOperational() {
return operational;
}
public void setOperational(boolean operational) {
this.operational = operational;
}
}
I get the following exception:
Caused by: org.hibernate.AnnotationException: Cannot find the expected secondary table: no PORT_STATUS available for <snip packages>.CustomerService
at org.hibernate.cfg.Ejb3Column.getJoin(Ejb3Column.java:293)
This occurs on startup - i.e. before it has even touched the DB. Any ideas?