Discussions

EJB design: RDBMS relations in entity beans

  1. RDBMS relations in entity beans (3 messages)

    Say I have a DOCUMENT table in the RDBMS. It has a column author_id which references to table USER, column id.

    I also have two entity beans, DocumentEJB and UserEJB. How would I go about relating the two beans? I don't want to just have a DocumentEJB.setUserID(). What would be a good way to make the entities relate more? Please give me some ideas... Maybe save the home interface? I'm really not sure what to do here, so any ideas would be greatly appreciated.

    I just figure there has to be a way to relate the objects at more than just the data tier...

    -Pat

    Threaded Messages (3)

  2. RDBMS relations in entity beans[ Go to top ]

    Hi pat,
    Why dont u go for a BMP where u can access both the tables ?

    Viji
  3. RDBMS relations in entity beans[ Go to top ]

    Read "Persistence Using reflection" that was presented in OOPSLA. Also read "Crossing Chasms". These patterns will show you how to use object ids and association tables to get a very graceful solution to this problem.
    Regards
    Anuj
  4. RDBMS relations in entity beans[ Go to top ]

    Anuj,

    Would you mind posting the URL(s) for this OOPSLA presentations you cited.

    Thanks - Sachin.