I want to develop a CMP on a table without primarykey

Discussions

EJB design: I want to develop a CMP on a table without primarykey

  1. I want to develop a CMP on a table without primarykey (5 messages)

    I want to develop a CMP on a table without primarykey ,how to do?
  2. Gxtiger,

      Then your primary key would have to be chosen from one of the existing columns, or more than one of the existing columns together.

    Floyd
  3. If none of the existing columns is the key , how to do it?
    And I don't want to choose the column as the primary key.
    Thanks!
  4. You cannot define an entity with no primary key. Either choose one of the attributes to be the primary key, add a synthetic key, or treat the table as holding dependent objects instead.

    It is a poor table design that has no primary key.
  5. If a table has no primary key, how to develop a CMP on it?
  6. suppose that you have developped a CMP, how would you locate one of the record (that is instantiate an EJB object on it)? after you have answered this question, maybe you will figure out the way.