[jboss-user] [JBoss Tools (users)] - Associations inside a composite identifier

xmedeko do-not-reply at jboss.com
Tue Aug 4 05:41:08 EDT 2009


Hi,

I have a JPA with associations inside a composite identifier, e.g. something like (from JBoss doc)


@Entity
  | @AssociationOverride( name="id.channel", joinColumns = @JoinColumn(name="chan_id") )
  | public class TvMagazin {
  |     @EmbeddedId public TvMagazinPk id;
  |     @Temporal(TemporalType.TIME) Date time;
  | }
  | 
  | @Embeddable
  | public class TvMagazinPk implements Serializable {
  |     @ManyToOne
  |     public Channel channel;
  |     public String name;
  |     @ManyToOne
  |     public Presenter presenter;
  | }
  | 
It works fine, just Eclipse shows error: Attribute "channel" has invalid mapping type in this context.

Do you know, how to get rid of this error? Except switching off the JPA facet support for the project :-)

Thanks

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4247796#4247796

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4247796



More information about the jboss-user mailing list