]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.databoard/src/org/simantics/databoard/Bindings.java
Fixing several binding-related bugs
[simantics/platform.git] / bundles / org.simantics.databoard / src / org / simantics / databoard / Bindings.java
index f9cf1002317a7c4ddd2285e8a6306bd17e3812a5..b1f53d0b611bb542197cdf7bb299b60a3438149b 100644 (file)
@@ -8,6 +8,7 @@
  *
  *  Contributors:
  *      VTT Technical Research Centre of Finland - initial API and implementation
+ *      Semantum Oy - gitlab #313
  *******************************************************************************/
 package org.simantics.databoard;
 
@@ -886,7 +887,14 @@ public class Bindings {
        
        databoard.initialize();
        
-               DATATYPE = getBindingUnchecked(Datatype.class);
+        DATATYPE = getBindingUnchecked(Datatype.class);
+        /**
+         * {@link Datatype} class has annotations but it can be considered a "class
+         * request" as it is a fundamental building block of Databoard and it has a
+         * fixed structure. Therefore {@link BindingRepository#classMap} is allowed
+         * to contain a cached Datatype.class -> Binding mapping.
+         */
+        bindingRepository.registerClassMapping(Datatype.class, DATATYPE);
     }
 
 }