dkarr wrote:
I'd prefer to avoid that annoyance, however. Is it practical in Hibernate to map a class to a table that doesn't have a primary key?
Well I don't think it is. Hibernate can do a lot of things to cope with legacy schema, but working without primary key is a bit too much I guess. I don't even thing the dtd allow not to specify an <id> or <composite-id>, does it?
Defining an additional column is exactly what si recommended anyway. The best practices recommends not to use composite ids when possible (even if Hibernate supports it very well), since it's more difficult to use that a simple identifier column.