Can I have an Entity bean representing two tables of a database?

Discussions

EJB design: Can I have an Entity bean representing two tables of a database?

  1. Hi,
      Iam new to this forum.
      waiting for the answer for the above question.
    regards,
    hari
  2. Yes. but you can't use CMP for this. You have to do this with BMP.

    Barri
  3. You can maintain relationship(primary table/secondary table) in a single entity bean across two tables in EJB 2.0 using CMP.But your question about mapping an entity bean to 2 tables can only be done using BMP but the whole purpose of using an Entity bean would be wasted as it should represent either a single entity/entity relationship in your system.
  4. hey one more doubt,
        so when using BMP,is there a similar concept of CMFs ??
  5. Hi,

    I beleive Weblogic 7.0 now supports multiple tables for one EJB in CMP

    http://e-docs.bea.com/wls/docs70/ejb/cmp.html#1093392