Hello,
First of all I was working with a single database and I didn't have any problems. Now I want to use 2 databases for different reasons and I am trying to move some entities and that's when I get the following error:
Error in deployment
java.lang.RuntimeException: Error reading annotations for generalModels.Allergen
Caused by: io.ebean.config.BeanNotRegisteredException: Error with association to [class models.Product] from [generalModels.Allergen.products]. Is class models.Product registered?
The definitions of the clases are:
@Entity
public class Allergen extends Model {
...
@ManyToMany(mappedBy="allergens")
private List<Product> products = new ArrayList<>();
public static Finder<Integer, Allergen> find = new Finder<>(Allergen.class, "general");
}
@Entity
public class Product extends Model {
...
@ManyToMany
public List<Allergen> allergens = new ArrayList<>();
Do you know how I can fix it? Thanks