1 Reply Latest reply: Mar 14, 2016 3:21 PM by Massimo Grossi RSS

    Multiple reference to the same table.

    Rafal Wardas

      Hello.

       

      I have problem with multiple references to the same object in model layer.

       

      Let's say I have two tables :

       

      ADDRESS_TABLE(

           ADDRESS_KEY,

           SOME_COL1

      )

       

      TRANSACTION_TABLE (

           SHIPPING_ADDRESS_KEY,

           PAYMENT_ADDRESS_KEY,

           SOME_COL1.

           SOME_COL1

      )


      To set proper relation between tables I'm forced to create two dynamic tables from address.

       

      SH_ADDRESS_TABLE(

            ADDRESS_KEY AS SHIPPING_ADDRESS_KEY,

           SOME_COL1 AS SH_SOME_COL1

      ).

      /* retrieved from RESIDENT ... */

      PAY_ADDRESS_TABLE(

            ADDRESS_KEY AS PAYMENT_ADDRESS_KEY,

           SOME_COL1 AS PAY_SOME_COL1

      ).


      is there any smarter way to do that? Do we really create copy of data or we are referring to the same physical place in memory?

       

      Regeards.