Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] JPA 2.0 question: derived @ManyToOne?

On Wed, Nov 10, 2010 at 10:50 AM, Laird Nelson <ljnelson@xxxxxxxxx> wrote:
Does JPA (and EclipseLink, as its reference implementation) support...derived many-to-one relationships?

I wonder, could I abuse the "table" attribute of the @JoinColumn annotation?

public class Response {
  @ManyToOne
  @JoinColumns({
    @JoinColumn(name = "answerID"), // straightforward
    @JoinColumn(table = "NamedAnswerSet", name = "name") // guessing this won't cut it
  })
  private Answer answer;
}

Best,
Laird


Back to the top