OneToMany with two id

I have two table with Embeddable

how I Connect between them :

table a | table b
a a
b b
c

class a
@EmbeddedId
private aPk id;

@Embeddable
class aPK
private long a;
private long b;

class b
@EmbeddedId
private bpk id;

@Embeddable
class bPk
private long a;
private long b;
private long c;