Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] OneToMany Interface mapping

Hi,

In my current project I must provide header interfaces for my
entities. For example I have the Paper interface like this:

=======================
public interface Paper {
   public void submit();
   public String title();
}
=======================

I have two different paper implementation and I want to map them to a
relational database. For one to one operations the @VariableOneToOne
annotation works well. I wonder why there is no @VariableOneToMany or
@VariableManyToMany annotation. Somewhere in code I want to map a list
of papers.

hibernate provides a @ManyToAny annotation that does the work but with
cost of an intermediate table like many to many relationships.

My first question is how should I do this with EclipseLink? Second, is
this kind of mapping inherently requires an intermediate table?

Regards


Back to the top