-
Enhancement
-
Resolution: Done
-
Major
-
2.16.0.Final
-
None
At the moment the class JPANewFieldWizard defines code as follow :
private List<JavaResource> getProjectEntities(Project project) { final List<JavaResource> entities = new ArrayList<>(); if (project != null) { project.getFacet(JavaSourceFacet.class).visitJavaSources(new JavaResourceVisitor() { @Override public void visit(VisitContext context, JavaResource resource) { try { JavaSource<?> javaSource = resource.getJavaType(); if (javaSource.hasAnnotation(Entity.class) || javaSource.hasAnnotation(Embeddable.class) || javaSource.hasAnnotation(MappedSuperclass.class)) { entities.add(resource); } } catch (ResourceException | FileNotFoundException e) { // ignore } } }); } return entities; }
This code should go into the PersistenceOperations class. There are other places like that.