I think I found error in the first edition:

page 333, Composite keys with annotations:


However, if you declare the refer-
encedColumnName for each column, order isn’t important, and both the source
and target tables of the foreign key constraint can have different column names.


Instead names should be order, right? Please add it to the errata for the first edition book.
Both order and name isn't important.
Ok, I understand, thanks.

Message was edited by:
Andrey11