1 Reply Latest reply on Apr 6, 2005 1:28 PM by Bill Burke

    Defaults for embedded objects

    Chris Richardson Newbie

      One of my classes has an embedded object:

      @Entity(access=AccessType.FIELD)
      class Foo {
      @Embedded
      private Bar bar;
      }
      
      @Embeddable(access=AccessType.FIELD)
      class Bar {
       private String x;
      }


      Preview 4 does not persist any of bar's fields unless I use @AttributeOverrride:

      class Foo {
       @Embedded(@AttributeOverride(name="x", column=@Column(name="X")))
      private Bar bar;
      }


      Is this the correct behavior?
      I would have expected field x to be persisted by default.