kartiksomani commented on a change in pull request #7663:
URL: https://github.com/apache/ignite/pull/7663#discussion_r422671175



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxyImpl.java
##########
@@ -1288,9 +1293,26 @@ private void validate(Query qry) {
         }
     }
 
+    /**
+     * Warns if an ineffective annotation is used
+     *
+     * @param valueCls Value class
+     */
+    private void checkIneffectiveAnnotations(Class valueCls) {
+        for (Field f:valueCls.getDeclaredFields()) {
+            AffinityKeyMapped[] annotations = 
f.getDeclaredAnnotationsByType(AffinityKeyMapped.class);
+            if (annotations.length > 0) {
+                LT.warn(log,
+                        "AffinityKeyMapped annotation should be used on key 
and not value type");
+            }
+
+        }
+    }
+
     /** {@inheritDoc} */
     @Override public void put(K key, V val) {
         IgniteInternalCache<K, V> delegate = getDelegateSafe();
+        checkIneffectiveAnnotations(val.getClass());

Review comment:
       @Mikhail1988 Where can I find new type registration method? I did see 
binary type configurator




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to