The best way it to add a surrogate key to the table currently identified by a composite key.
If you can't change the DDL, you need to define a composite key as per the
documentation . Of course as Mark has already pointed out, you can't
update this value, only delete and insert. So, presuming you don't have any FK constraints that will prevent you doing this you can simulate an update. If you do, you'll need to change your ER model (not a Hibernate restriction, this is just how relational databases work).