### Eclipse Workspace Patch 1.0 #P org.hibernate.eclipse.jdt.ui_3.1.x Index: src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java =================================================================== --- src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java (revision 20828) +++ src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java (working copy) @@ -16,6 +16,7 @@ import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Properties; import java.util.Set; import java.util.Map.Entry; @@ -173,6 +174,11 @@ if (pc != null){ if (pc.isAbstract()){ subclass = new SingleTableSubclass(pc); + if (pc instanceof RootClass && pc.getDiscriminator() == null){ + SimpleValue discr = new SimpleValue(); + discr.setTypeName("string"); //$NON-NLS-1$ + ((RootClass)pc).setDiscriminator(discr); + } } else { subclass = new JoinedSubclass(pc); } @@ -561,6 +567,13 @@ ((IndexedCollection)value).setIndex(map_key); } prop.setCascade("none");//$NON-NLS-1$ + } else if (tb.isEnum()){ + value = buildSimpleValue(org.hibernate.type.EnumType.class.getName()); + Properties typeParameters = new Properties(); + typeParameters.put(org.hibernate.type.EnumType.ENUM, tb.getBinaryName()); + typeParameters.put(org.hibernate.type.EnumType.TYPE, java.sql.Types.VARCHAR); + ((SimpleValue)value).setTypeParameters(typeParameters); + buildProperty(value); } else if (ref != null){ ToOne sValue = null; if (ref.refType == RefType.MANY2ONE){ @@ -579,7 +592,11 @@ sValue.setTypeName(tb.getBinaryName()); sValue.setFetchMode(FetchMode.JOIN); RootClass associatedClass = rootClasses.get(ref.fullyQualifiedName); - sValue.setReferencedEntityName(associatedClass.getEntityName()); + if (associatedClass != null){ + sValue.setReferencedEntityName(associatedClass.getEntityName()); + } else { + sValue.setReferencedPropertyName(ref.fullyQualifiedName); + } buildProperty(sValue); prop.setCascade("none");//$NON-NLS-1$ } else {