1 Reply Latest reply on Aug 20, 2001 4:22 PM by nemesis

    Add attributes to a entity bean ??

    cptncrunch

      I have a a bean (CMP) with 4 attributes. I deploy this bean -> OK.
      Now i add 2 attributes to the bean (no beans in the database),
      change the desciptor, make a new jar and deploy -> OK. I create
      the bean -> exception message:The attribute '..' is not in the database. Whats wrong ?
      Thanks in advance.

      Bye
      Uwe

        • 1. Re: Add attributes to a entity bean ??
          nemesis

          a) Drop your table and re-deploy the bean.. the auto-deployer will not find the table and will re-create it with the extra attributes

          alternatively,

          b) If you have a jaws.xml in your jar, set:
          <remove-table>true</remove-table> in your ejb or <default-entity>

          I would not recommend (b) really as you might loose a table containing valuable data if you accidentally re-deploy the bean later on!

          Cheers,
          Nemesis