Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

FIXING #95, skip row key when mapping

  • Loading branch information...
commit f9ba0040fd72e773b72c5230e97e17bca336509b 1 parent ba551d0
moritz mack authored
Showing with 8 additions and 8 deletions.
  1. +8 −8 src/main/java/com/netflix/astyanax/mapping/Mapping.java
View
16 src/main/java/com/netflix/astyanax/mapping/Mapping.java
@@ -15,6 +15,13 @@
******************************************************************************/
package com.netflix.astyanax.mapping;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Field;
+import java.util.Collection;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicBoolean;
+
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
@@ -24,13 +31,6 @@
import com.netflix.astyanax.model.Row;
import com.netflix.astyanax.model.Rows;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Field;
-import java.util.Collection;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicBoolean;
-
/**
* <p>
* Utility for doing object/relational mapping between bean-like instances and
@@ -312,7 +312,7 @@ public T initInstance(T instance, ColumnList<String> columns) {
mappingName = annotationSet.getColumnName(field, columnAnnotation);
}
- if (mappingName != null) {
+ if (mappingName != null && !isKey.get()) {
Preconditions.checkArgument(
!usedNames.contains(mappingName.toLowerCase()), mappingName
+ " has already been used for this column family");
Please sign in to comment.
Something went wrong with that request. Please try again.