• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Same Entity in different packages.

 
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: 17278
6
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