0 Replies Latest reply on Jan 18, 2006 2:40 PM by JBoss_newbie

    Update in the entity attributes not altering the database ta

    JBoss_newbie Newbie

      Hi,

      I created entity bean class called User and wrote sample programs to explore the CMPs. When I deploy and run my ejbs, I am able to see the table created and rows getting created for the User entity instances. Now, I tried to modify the User bean class to add one more property to store the mobile phone numbers. So when I deploy the ejbs this time, I get this error

      13:38:35,994 ERROR [SchemaUpdate] Unsuccessful: alter table USERS add mobileNumber varchar(255)
      13:38:36,009 ERROR [SchemaUpdate] ASA Error -116: Table must be empty

      Ideally I am expecting the server to add the new property as a new column in the USERS table. For this the table need not be empty. Then why is it failing to alter the table and add the new column as it it.

      Thanks,
      Uma