Hello Marco Sabato, thanks for reporting the issue and providing a reproducer! I did some tests and looks like the problem is you’re trying to create an association to two @JoinColumn}}s that span 2 different tables: {{GSBER is in the CountryEntityCompositeKey primary table (HDLNDP), while (HCSLN) is in its secondary table HDCNTP (though the mapping is a bit confusing and I might be wrong, I actually renamed all tables and columns to make sense of the example). Joining with multiple columns that are not in the same table is not allowed and, even though the error is a bit misleading, it's not related to the @SecondaryTable key being Composite. I also tested with 5.6 to be sure and the error is the same. |