This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Mapping composite IDs can be a little fiddly Bruno Ambrozio. The example in the Hibernate documentation is as much direstion as anyone can really give you. If you are sure you've carefully tried this, why don't you post you mapping (and possibly the error Hibernate is returning) etc. and we'll see if anyone can spot what's wrong?