0 Replies Latest reply on Oct 21, 2005 3:20 PM by dornus

    Best approach for persisting values across tables

    dornus Novice

      I have data collected by a jsp which spans multiple tables. I am trying to figure out the best way to persist the data.

      For example:

       - TableOneId ( integer-autogenerated )
       - MyColumnOne ( varchar(200) )
       - MyColumnTwo ( varchar(200) )

       - TableTwoId ( integer-autogenerated )
       - MyColumnThree ( varchar(200) )
       - MyColumnFour ( varchar(200) )
       - MyColumnFive ( varchar(200) )
       - MyColumnSix ( varchar(200) )

      Let's say my jsp has a form with the following fields

      So, I collect all values for TableOne and one value for TableTwo.

      Do I:
      A) create a separate entity file for TableOne and TableTwo. Use all the values aquired by the jsp, and populate TableOne and TableTwo with the appropriate code?

      B) create a view which holds the columns used in the jsp. I would then send the values to the view to be persisted.

      C) somehow create a single entity file which references both TableOne and TableTwo. Or references TableOne and only MyColumnFour of TableTwo.

      D) ???