rename @RowId to @PrimaryKey same as in CQL3
This commit is contained in:
@@ -61,7 +61,7 @@ public class BasicCassandraPersistentProperty extends AnnotationBasedPersistentP
|
||||
return true;
|
||||
}
|
||||
|
||||
return getField().isAnnotationPresent(RowId.class);
|
||||
return getField().isAnnotationPresent(PrimaryKey.class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -30,5 +30,5 @@ import org.springframework.data.annotation.Id;
|
||||
@Retention(value = RetentionPolicy.RUNTIME)
|
||||
@Target(value = { ElementType.FIELD, ElementType.METHOD, ElementType.ANNOTATION_TYPE })
|
||||
@Id
|
||||
public @interface RowId {
|
||||
public @interface PrimaryKey {
|
||||
}
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
package org.springframework.data.cassandra.test.integration.table;
|
||||
|
||||
import org.springframework.data.cassandra.mapping.RowId;
|
||||
import org.springframework.data.cassandra.mapping.PrimaryKey;
|
||||
import org.springframework.data.cassandra.mapping.Table;
|
||||
|
||||
/**
|
||||
@@ -27,7 +27,7 @@ import org.springframework.data.cassandra.mapping.Table;
|
||||
@Table(name = "book")
|
||||
public class Book {
|
||||
|
||||
@RowId
|
||||
@PrimaryKey
|
||||
private String isbn;
|
||||
|
||||
private String title;
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.Date;
|
||||
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.cassandra.mapping.Column;
|
||||
import org.springframework.data.cassandra.mapping.RowId;
|
||||
import org.springframework.data.cassandra.mapping.PrimaryKey;
|
||||
import org.springframework.data.cassandra.mapping.Table;
|
||||
|
||||
/**
|
||||
@@ -37,7 +37,7 @@ public class LogEntry {
|
||||
/*
|
||||
* Primary Row ID
|
||||
*/
|
||||
@RowId
|
||||
@PrimaryKey
|
||||
private Date logDate;
|
||||
|
||||
private String hostname;
|
||||
|
||||
Reference in New Issue
Block a user