Author: vyemialyanchyk
Date: 2011-01-17 14:05:51 -0500 (Mon, 17 Jan 2011)
New Revision: 28316
Modified:
branches/jbosstools-3.2.0.CR1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java
Log:
https://issues.jboss.org/browse/JBIDE-8121 - fixed
Modified:
branches/jbosstools-3.2.0.CR1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java
===================================================================
---
branches/jbosstools-3.2.0.CR1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java 2011-01-17
19:05:29 UTC (rev 28315)
+++
branches/jbosstools-3.2.0.CR1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java 2011-01-17
19:05:51 UTC (rev 28316)
@@ -262,7 +262,8 @@
propRegion = findAdapter.find(startOffset, hbmPropertyPattern, true, true, false,
true);
PersistentClass rootClass = parentProperty.getPersistentClass();
if (propRegion == null && parentProperty.isComposite()
- && rootClass.getIdentifierProperty() == parentProperty) {
+ && (rootClass.getIdentifierProperty() == parentProperty ||
+ !rootClass.hasIdentifierProperty())) {
// try to use key-property
String pattern = hbmPropertyPattern.replaceFirst("<property",
"<key-property"); //$NON-NLS-1$ //$NON-NLS-2$
propRegion = findAdapter.find(startOffset, pattern, true, true, false, true);