0 Replies Latest reply on Jul 14, 2006 3:37 PM by bluetrade

    Instantiate on demand

    bluetrade

      Hi,
      I have a small question regarding the instantiation of entites inside other entites.

      Lets say the following:
      class Info {
      private PhoneNumber phone;
      private Email mail;

      }

      now when I am in the view and want to use the info.phone.description I would have had to write "private PhoneNumber phone = new PhoneNumber" instead, however I only want to do this if the customer decides to really enter one, otherwise there are lots of blanks in the DB... if I do as I want, I get a "not-null property references a null or transient value property"-Exception... Do you have any clues on how to solve this problem?
      Thanks!