[407652] Generate entities from tables wizard does not generate
entities implementing java.io.Serializable
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/wizards/gen/GenerateEntitiesFromSchemaWizard.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/wizards/gen/GenerateEntitiesFromSchemaWizard.java
index b94f6e8..5909818 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/wizards/gen/GenerateEntitiesFromSchemaWizard.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/wizards/gen/GenerateEntitiesFromSchemaWizard.java
@@ -11,6 +11,7 @@
import java.io.File;
import java.io.IOException;
+import java.util.Arrays;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceRuleFactory;
@@ -195,7 +196,12 @@
else if (newDefaultTable.getPackage().equals(StringTools.EMPTY_STRING)) {
newDefaultTable.setPackage(JpaPreferences.getEntityGenDefaultPackageName(this.jpaProject.getProject()));
}
-
+ //test to see if this is our first entity gen run for this project
+ //if so, default all entities generated to implement serializable here
+ //in case user clicks finish on first page - see bug 407652
+ if (this.customizer.getTableNames().isEmpty()) {
+ newDefaultTable.setImplements(Arrays.asList(ORMGenTable.SERIALIZABLE_INTERFACE));
+ }
return this.customizer;
}