I have a legacy table Sale which references a legacy table Person.
The table Person has a composite key of personType and lastName.
The table Sale just has a lastName property,
it doesn't have a personType property because that's always the constant number 937.
I can easily set up the table of Person, but I can't create the association from Sale:
@ManyToOne
@JoinColumns ({
@JoinColumn(name="lastName", referencedColumnName = "lastName"),
@JoinColumn(name="937", referencedColumnName = "personType")
})
public Person getPerson() { //...
Is this actually solvable in Hibernate?
_________________ http://www.ohloh.net/accounts/ge0ffrey
|