JPA ManytoMany Relationship "JoinColumn cannot be resolved to a type" error JPA ManytoMany Relationship "JoinColumn cannot be resolved to a type" error spring spring

JPA ManytoMany Relationship "JoinColumn cannot be resolved to a type" error


Just write this at the head of your class

import javax.persistence.JoinColumn;

Sometime eclipse doesn't show the link to import it in context menu, but it's there. Hope it will help someone.