This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Same Entity in different packages.  RSS feed

 
ambar patil
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can we use same entity name in different packages.
like :
pkgA.entityA
pkgB.entityA
I am getting error: org.hibernate.AnnotationException: Use of the same entity name twice:
Any workaround ? I dont wann change name..
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you can, and the way to do that is to include the package name in the @Entity name.

Mark
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!