Skip to content
Advertisement

Is there a way to use @OneToMany and @ManyToMany to handle polymorphism in hibernate

I am working on app that uses microservices architecture, i have project A which has this entity User with this code

JavaScript

and another entity Authority

JavaScript

and i have project B which has entity AAA with this code:

JavaScript

so when i run the the project B I get the following error:

org.hibernate.AnnotationException: Use of @OneToMany or @ManyToMany targeting an unmapped class: com.A.model.User.authorities[com.A.model.Authority

Advertisement

Answer

I get the solution from here the link may be it help someone

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement