I've generated my metamodels correctly as seen below. They do not import the actual entity class therefore I get the " cannot be resolved to a type" compiler error.
package dummy.package;
import javax.annotation.Generated;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value = "org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor")
@StaticMetamodel(MyClass.class)
public abstract class MyClass_ {
}
as you can see, the class used in the @StaticMetamodel annotation isn't imported
My assumptions and questions are:
1) Assumption: Both classes have the same package structure, so i'm assuming that we won't need to import the class (both declared under "dummy.package") But why do I get the error?
2) The metamodel is actually under "annotations.dummy.package" even though the file says "dummy.package", that's a different error (does not match the expected package) Can this be the reason for issue #1 above?