Ideally, if you can change the data model, give this table a surrogate key. Its far easier in the long run.
If you can't, you need to map the composite key. To do this Hibernate defines a composite-id element you use instead of the normal id element in your mapping files. You could map the key like this:
In order for Hibernate to properly manage object identity with a composite key, you need to override the equals() and hashCode() methods in your POJO class. This way your POJO itself is its own key.
The alternative, and more elegant, way is to define a seperate identifier class which contains the two properties in your key and overrides equals() and hashCode(). If you did this, your mapping looks like this:
[ April 22, 2005: Message edited by: Paul Sturrock ]