3 Replies Latest reply on Feb 4, 2005 4:33 PM by Dan Christopherson

    ManyToOne in an Embedded object?

    Dan Christopherson Newbie

      I've got a situation with an embedded object that has as one of its properties a @ManyToOne relationship to an Entity. Under today's CVS, this is being mapped into a bytea (postgresql) rather than the expected bigint foreign key. For reference, here's my Embedded:

      @Embedded({
       @AttributeOverride(name="unit", column=@Column(name="dur_unit")),
       @AttributeOverride(name="magnitude", column=@Column(name="dur_mag", columnDefinition="number(10,2)"))
       })
      public Duration getDuration() {
       return duration;
      }


      The spec I have access to doesn't say anything about this sort of situation, but then it's still talking about DependentObject/Dependent. Looking at AttributeOverride itself, I don't see a clear way to resolve this sort of issue. Is this a hole in the spec, or should the Column be magically interpreted the RightWay by the implementation?

      thanks all,
      danch