Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTran Le2013-05-14 17:36:06 -0400
committerTran Le2013-05-14 17:36:06 -0400
commit5bbbd6f490d0f79cef9af28ffb302ee4dfc5be10 (patch)
tree501f4286bab7f3555522b91e2a4e06527bdc4124
parent00365beaa43dcdc13dd64cb41389b5c095bffe7b (diff)
downloadwebtools.dali-5bbbd6f490d0f79cef9af28ffb302ee4dfc5be10.tar.gz
webtools.dali-5bbbd6f490d0f79cef9af28ffb302ee4dfc5be10.tar.xz
webtools.dali-5bbbd6f490d0f79cef9af28ffb302ee4dfc5be10.zip
[407652] Generate entities from tables wizard does not generatev201305142138
entities implementing java.io.Serializable
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/wizards/gen/GenerateEntitiesFromSchemaWizard.java8
1 files changed, 7 insertions, 1 deletions
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 b94f6e895e..5909818c67 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 @@ package org.eclipse.jpt.jpa.ui.internal.wizards.gen;
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 @@ public class GenerateEntitiesFromSchemaWizard
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;
}

Back to the top