Author: dgeraskov
Date: 2009-10-23 09:59:34 -0400 (Fri, 23 Oct 2009)
New Revision: 18261
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-5077
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 2009-10-23
12:54:48 UTC (rev 18260)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java 2009-10-23
13:59:34 UTC (rev 18261)
@@ -315,7 +315,6 @@
} else {
rootClass.addProperty(prop);
}
- //System.out.println("From method->" + varName);
}
}
return super.visit(node);
@@ -435,7 +434,7 @@
OneToMany oValue = new OneToMany(rootClass);
RootClass associatedClass = rootClasses.get(ref.fullyQualifiedName);
oValue.setAssociatedClass(associatedClass);
- oValue.setReferencedEntityName(ref.fullyQualifiedName);
+ oValue.setReferencedEntityName(associatedClass.getEntityName());
//Set another table
cValue.setCollectionTable(associatedClass.getTable());
cValue.setElement(oValue);
@@ -515,7 +514,8 @@
sValue.addColumn(column);
sValue.setTypeName(tb.getBinaryName());
sValue.setFetchMode(FetchMode.JOIN);
- sValue.setReferencedEntityName(ref.fullyQualifiedName);
+ RootClass associatedClass = rootClasses.get(ref.fullyQualifiedName);
+ sValue.setReferencedEntityName(associatedClass.getEntityName());
buildProperty(sValue);
prop.setCascade("none");//$NON-NLS-1$
} else {
@@ -561,7 +561,7 @@
if (cValue == null) return null;
- //By default set the same table, but for one-to many should change it to associated
class's table
+ //By default set the same table, but for one-to-many should change it to associated
class's table
cValue.setCollectionTable(rootClass.getTable());
SimpleValue key = new SimpleValue();