Possible Duplicate:
Hibernate and no PK
Anyone knows how to do hibernate mapping for table or view without a primary key?
Don't think Hibernate allows mapping a table without a primary key...think about how Hibernate would perform updates without a column that can uniquely identify a row.
I guess a work-around would be to use a composite key with all columns, but you are much better off adding a primary key.
I would do this only when you are reading data (not writing it). When you have a DB like oracle, you can have statements like
select DOKUMENT.*, ROWID from DOKUMENT
→ and thus, you can add this statement into the Hibernate mapping:
<id column="ROWID" type="string" />
subsequently, you define all other columns as
<property...
When you use the reverse engineering Wizard, you can