0

I want to model this:

enter image description here

I doubt that this is right:

@Entity data class(@OneToOne val group: Group, @OneToOne val subgroup: Subgroup) 
user3344570
  • 99
  • 1
  • 8

1 Answers1

0

It's relating to JPA more than kotlin language. You can reference this: Mapping ManyToMany with composite Primary key and Annotation:

Jun Bach
  • 111
  • 1
  • 10