I have created the following entity bean, and specified two columns as being unique. Now my problem is that the table is created without the unique constraint, and no errors
More suggestions than a real answer...
you should clarify which JPA provider (and the version) you are using for such questions.
I notice that one of your column is part of a ManyToOne
association, this might be a "special" case not well handled by your JPA provider. By not well handled, I mean bug. I'd check the issue tracker for an existing issue (and maybe create a new one, your case seems JPA compliant).