401839 - Fix composite PK FK mappings in Entity Generation.
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.gen/src/org/eclipse/jpt/jpa/gen/internal/ORMGenColumn.java b/jpa/plugins/org.eclipse.jpt.jpa.gen/src/org/eclipse/jpt/jpa/gen/internal/ORMGenColumn.java
index 6fed057..dff7f17 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.gen/src/org/eclipse/jpt/jpa/gen/internal/ORMGenColumn.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.gen/src/org/eclipse/jpt/jpa/gen/internal/ORMGenColumn.java
@@ -370,7 +370,9 @@
 	}
 	
 	public boolean isUpdateable() {
-		return !"false".equals(customized(UPDATEABLE)); //defaults to true //$NON-NLS-1$
+		return (this.isForeignKey() && this.isPartOfCompositePrimaryKey()) ?
+				false : 
+				!"false".equals(customized(UPDATEABLE)); //defaults to true //$NON-NLS-1$
 	}
 	
 	public void setUpdateable(boolean value) {
@@ -378,7 +380,9 @@
 	}
 	
 	public boolean isInsertable() {
-		return !"false".equals(customized(INSERTABLE)); //defaults to true //$NON-NLS-1$
+		return (this.isForeignKey() && this.isPartOfCompositePrimaryKey()) ?
+				false : 
+				!"false".equals(customized(INSERTABLE)); //defaults to true //$NON-NLS-1$
 	}
 	
 	public void setInsertable(boolean value) {