我有以下POJO:
@Table(name = "order", readConsistency = "QUORUM", writeConsistency = "QUORUM")
public class Order {
@Column(name = "id")
@PartitionKey
private String id;
@Column(name = "customer_id")
private String customerId;
@Column(name = "loyalty_id")
private String loyaltyId;
@Column(name = "customer_email")
private String customerEmail;
public Order() {
}
... getters and setters
}
现在我写的OrderDao如下:
import com.datastax.oss.driver.api.mapper.annotations.*;
@Dao
public interface OrderDao {
@Select
Order findById(String orderId);
@Insert
void save(Order order);
@Delete
void delete(Order order);
}
当我执行./gradlew build
时,我得到以下错误:
第一个
我将按照以下文档进行实施:https://docs.datastax.com/en/developer/java-driver/4.2/manual/mapper/。可能的原因是什么?
- 谢谢-谢谢
1条答案
按热度按时间xuo3flqw1#
Order
类上缺少@Entity
注解: