Usually when you have that model, you create a class that will store both properties and this will act as a Id Class, then you have your @Id on one property in the mapped class so
public class MyPK{
private Long someNumber;
private
String someOtherField;
}
@Entity
public class AMappedClass{
@Id
private MyPK myId;
}
Or is it @EmbeddedId? I can't remember if @EmbeddedId is currently there, or if it is still in discussion by the JSR group for the next version of JPA.
Mark