Skip to main content
summaryrefslogtreecommitdiffstats
path: root/jpa
diff options
context:
space:
mode:
authorkmoore2010-04-13 16:15:40 +0000
committerkmoore2010-04-13 16:15:40 +0000
commitef5bb6fea965f89bf047c55aa6f195ebdb7e2ed8 (patch)
tree79bccedb4857d2ae662173e639a97fae3a8dc4d8 /jpa
parent286c32916caf701f649926f84d8f99b7c16fcf26 (diff)
downloadwebtools.dali-ef5bb6fea965f89bf047c55aa6f195ebdb7e2ed8.tar.gz
webtools.dali-ef5bb6fea965f89bf047c55aa6f195ebdb7e2ed8.tar.xz
webtools.dali-ef5bb6fea965f89bf047c55aa6f195ebdb7e2ed8.zip
updated comments
Diffstat (limited to 'jpa')
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/MappingTools.java13
1 files changed, 4 insertions, 9 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/MappingTools.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/MappingTools.java
index ee22afcaf3..106fc8d1e4 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/MappingTools.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/context/MappingTools.java
@@ -163,7 +163,10 @@ public class MappingTools {
/**
* If appropriate, return the name of the single primary key column of the
- * target entity.
+ * relationship target.
+ * Spec states:<br>
+ * "The same name as the primary key column of the referenced table."<br>
+ * We are assuming that the primary key column is defined by the mappings instead of the database.
*/
public static String buildJoinColumnDefaultReferencedColumnName(JoinColumn.Owner joinColumnOwner) {
if (joinColumnOwner.joinColumnsSize() != 1) {
@@ -174,14 +177,6 @@ public class MappingTools {
return null;
}
return targetEntity.getPrimaryKeyColumnName();
-//spec states:
-//The same name as the primary key column of the referenced table.
-//If we do this instead I think we would need the call to convertNameToIdentifier in buildJoinColumnDefaultName
-// Table refDbTable = joinColumnOwner.getReferencedColumnDbTable();
-// if (refDbTable != null && refDbTable.getPrimaryKeyColumnsSize() == 1) {
-// return refDbTable.getPrimaryKeyColumn().getName();
-// }
-// return null;
}
public static ColumnMapping getColumnMapping(String attributeName, PersistentType persistentType) {

Back to the top