1 Reply Latest reply on Nov 29, 2006 11:07 AM by M K

    ejbCreate saving null values

    M K Newbie

      I have a bean named ApplicationBean. When I call create on Application, it only creates null values in the database. It does however try to create a new row with these null values.
      However, when I call the set methods, it sets properly, and it gets when calling the get properties.

      This is my ejbCreate:

      public PersonPK ejbCreate(String name, String surname, String ssn, String email, String status, String registrationDate, int id) throws CreateException
       {
       this.name = name;
       this.surname = surname;
       this.ssn = ssn;
       this.email = email;
       this.status = status;
       this.registrationDate = registrationDate;
       this.id = id;
      
       return null;
       }


      It doesn't matter if I return a
      new PersonPK(id)

      instead of null, I still get the same results.

      Since the getters and setters work, I believe the xml-files are properly set, or they should fail too.
      Or so I assume.

      Wouldn't be such a big deal, if not for the fact that the primary key can only be set in the create method. Anyone know how to solve this?