1 Reply Latest reply on Apr 28, 2003 1:14 AM by David Durst

    Design question

    Raja Master

      I have two CMR Tables Customer and Product which have a many-to-many mapping using a "Customer-Product" Table. All is well till this point and Jboss creates the tables and populates values fine.

      If i need another column in this mapping table, say, Support_Duration, and i create the table manually, how can i insert values into this Support_Duration? This table is not a Container managed table, so im not sure how an external column value can be populated.


        • 1. Re: Design question
          David Durst Newbie

          Well I am not a expert, but here is how I would solve the issue.

          I am under the impressiont that both Customer and Product are already CMP. So create a Getter/Setter Methods for this new field and do the JDBC inside of them and throw some custom exception if there is some type of DB error.

          If this field is required make sure to add the Attribute to the ejbCreate method and if the setter method for this new field throws the custom exception roll back the transaction and throw a create exception.

          But then again I am not a expert.