If I have a table with columns A, B, C, D
A: auto-generated id (PK)
B & C: combination must be unique (these are the columns that actually de
If (B,C) is a unique pair, there's no need for an auto-generated id in addition. For the table, A is equivalent to (B,C) (one-to-one relation).
You may want or need the extra key, but I agree with seanizer, use (B,C) for equals and because A is redundant (and null before the object is persisted), don't use that for equals (and hashcode)