Two entities with the same name in differents packages

<>

This question already has an answer here:

Answers


Am sure you are not getting a compile time error, its deployment error that you must be encountering. the problem is when you package then into an ear/war before deploying, both the class come to the server. Whilst any JPA application the container does not know which class to invoke, thus it throws an exception

Is it not possible for you to extend one class and carry your operations or you can create an instance of one class in another and add a one-to-one mapping between them.


This implies you have two tables with the same name in your database, which is highly unlikely.

You'll need to use the Entity.name value, or if you're using JPA you can also use the javax.persistence.Table annotation.


Need Your Help

angle attribute in android gradient

android android-layout android-intent

I am going through test example. Where for some Image background they are using gradient,

Objective C framework for social network and web services integration

iphone objective-c ios social-networking

In my app I want to provide a strong integration with social network and web services (facebook, flickr, youtube, picasa, dropbox… and more!).