0 Replies Latest reply on Jun 3, 2010 9:22 AM by serkan.s.eskici.online.nl

    Embeddable entities persisted as null



      I'm having the following problem:

      When I try to persist an entity with an embeddable component, then the later gets persisted as null (columns). Even when its values are not null !

      So here is my code:

      public class Customer {
        //some primitive attributes
        @Embedded @NotNull  
        private Address address = new Address();  <----- this is an Embeddable with just Strings (street, city, etc.)

      <h:inputText value="#{customer.address.street}" />
      <h:commandButton action="#{customerHome.persist()}"/>

      And after I enter some values for the Address component and try to persist it, the Address gets not persisted. All its values are null in the database.

      So what's going on ? -This is the first time I encounter this problem...