I am getting :
org.hibernate.MappingException: Foreign key (FKBB979BF4266AA123:address [a_id])) must have same number of columns as the referenced primary key (
You need to create a reference table:
CREATE TABLE PersonsAddresses (personId BIGINT, addressId BIGINT)
and change the mapping of the set to this: