3 Replies Latest reply on Aug 5, 2009 10:00 AM by xmedeko

    Associations inside a composite identifier

    xmedeko

      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