1 Reply Latest reply on Jan 16, 2003 7:16 AM by h2o_polo

    table without primary key

    kay_haribabu

      hai all
      cant i have a table without a primary key.
      I tried to have one.
      But when i deploed that entity bean in jboss,
      the query that was generated looked like,

      "create table table1(name varchar(10,age number(3) constraint constraint_ name primary key( ))"
      Note:
      There is no primary Key but still the constraint is generated without a column name which give me error.

      Is there any way to tel Jboss not to have primary key?

      Hari Babu

        • 1. Re: table without primary key
          h2o_polo


          If findByPrimaryKey is a required method of your entity bean's home interface how would you have an entity without a primary key?

          If you have a need for entity without a pk anyway, just make one up. Add an autoincrement/serial id field.