Author: dgeraskov
Date: 2009-01-13 05:04:50 -0500 (Tue, 13 Jan 2009)
New Revision: 13009
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/EntityInfo.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3426
'id_Article' field must always win 'idX' for entity Article
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/EntityInfo.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/EntityInfo.java 2009-01-13
09:42:19 UTC (rev 13008)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/common/EntityInfo.java 2009-01-13
10:04:50 UTC (rev 13009)
@@ -212,7 +212,8 @@
if (primaryIdName == null) {
primaryIdName = name;
}
- else if (primaryIdName.length() > name.length()) {
+ else if (primaryIdName.toLowerCase().indexOf(entityName) == -1 ||
+ primaryIdName.length() > name.length()) {
primaryIdName = name;
}
}