Hallo, i have this class
@Entity @Table(name = "operator") @Inheritance(strategy = InheritanceType.JOINED) public class Operator { private Long id;
private Operator operatoractive; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) public Long getId() { return id; }
...
@OneToOne( targetEntity=it.rovell74.Operator.class, cascade={CascadeType.PERSIST,CascadeType.MERGE}, fetch = FetchType.EAGER ) @JoinTable( name = "operatoractive", joinColumns={@JoinColumn(name="idoperator")}, inverseJoinColumns={@JoinColumn(name="idoperatoractive")} ) public Operator getOperatoractive() { return operatoractive; }
public void setOperatoractive(Operator operatoractive) { this.operatoractive = operatoractive; }
}
"operator active" is a view with two columns - idoperator - idoperatoractive that are foreign keys for operator primary key
Hibernate always return the same error
>> 22:53:21,074 ERROR AssertionFailure:22 - an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session) >> org.hibernate.AssertionFailure: Table operatoractive not found
Can someone help me to solve this problem?
Thank you very much
|