This content has been marked as final.
Show 1 reply
-
1. Re: @ManyToOne + @JoinColumn => no CONSTRAINT FOREIGN KEY !
diamss Jan 12, 2006 10:08 AM (in response to diamss)Fixed: Just do not use a multiple primary key but an automatic ID with unique constraints.
@Entity
@Table(uniqueConstraints = {@UniqueConstraint(columnNames={"system", "type", "starttime"})})
public class Log implements Serializable {
...
@ManyToOne
@JoinColumn(name = "system")
public System getSystem() {
return system;
}
...
}