Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/relations/OneToOneBiDirRelation.java')
-rw-r--r--jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/relations/OneToOneBiDirRelation.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/relations/OneToOneBiDirRelation.java b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/relations/OneToOneBiDirRelation.java
index 79ae9c0522..264c8adb19 100644
--- a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/relations/OneToOneBiDirRelation.java
+++ b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/relations/OneToOneBiDirRelation.java
@@ -27,12 +27,13 @@ public class OneToOneBiDirRelation extends OneToOneRelation implements IBidirect
JavaPersistentType inverse,
String ownerAttributeName,
String inverseAttributeName,
- boolean createAttribs, JavaPersistentType embeddingEntity) {
+ boolean createAttribs, JavaPersistentType embeddingEntity,
+ boolean isDerivedIdFeature) {
super(owner, inverse);
this.ownerAttributeName = ownerAttributeName;
this.inverseAttributeName = inverseAttributeName;
if (createAttribs)
- createRelation(fp, embeddingEntity);
+ createRelation(fp, embeddingEntity, isDerivedIdFeature);
}
@Override
@@ -57,8 +58,11 @@ public class OneToOneBiDirRelation extends OneToOneRelation implements IBidirect
this.inverseAnnotatedAttribute = inverseAnnotatedAttribute;
}
- private void createRelation(IJPAEditorFeatureProvider fp, JavaPersistentType embeddingEntity) {
+ private void createRelation(IJPAEditorFeatureProvider fp, JavaPersistentType embeddingEntity, boolean isDerivedIdFeature) {
ownerAnnotatedAttribute = JPAEditorUtil.addAnnotatedAttribute(fp, owner, inverse, false, null);
+ if(isDerivedIdFeature){
+ JpaArtifactFactory.instance().calculateDerivedIdAnnotation(owner, inverse, ownerAnnotatedAttribute);
+ }
if(JpaArtifactFactory.instance().hasEmbeddableAnnotation(owner)){
inverseAnnotatedAttribute = JPAEditorUtil.addAnnotatedAttribute(fp, inverse, embeddingEntity, false, null);
@@ -72,4 +76,4 @@ public class OneToOneBiDirRelation extends OneToOneRelation implements IBidirect
public RelDir getRelDir() {
return RelDir.BI;
}
-} \ No newline at end of file
+}

Back to the top