Author: dgeraskov
Date: 2010-03-12 04:29:13 -0500 (Fri, 12 Mar 2010)
New Revision: 20794
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6040
enum property mapping added
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java 2010-03-12
08:27:19 UTC (rev 20793)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java 2010-03-12
09:29:13 UTC (rev 20794)
@@ -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;
@@ -561,6 +562,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){