How to design create method in entity beans when table is 30 col

Discussions

EJB design: How to design create method in entity beans when table is 30 col

  1. Hi,

    How to design create method in entity beans when table has many columns...

      -- is good to pass all the columns has method arguments

      -- Pass an object(Record Object which has all setter and getter methods)

    --Thxs\SuresH
  2. I think the depends on the database design as well as technical issues. For a create method you need to provide at a minimum all of the non-null fields. You could then do this and then use normal sets on all of the other fields. Passing in a value object as you suggested is also an option, especially if the number of field may change over time.
  3. Just adding to all this my opinion would be don`t use CMP for 30 column table
  4. Why not CMP for 30 coloumns[ Go to top ]

    Why Not CMP for 30 coloumns ?

    List me the drawbacks....