圣杯

z9smfwbn  于 2021-06-14  发布在  Cassandra
关注(0)|答案(1)|浏览(281)

我正在尝试使用cassandraorm插件将grails中的域对象持久化到cassandra数据库。我以前使用gorm成功地将它保存到h2,但是我想尝试一下cassandra。
对象定义如下:

package gibb1

class newCassa {
    UUID uuid
    String name
    String score

     static cassandraMapping = [
            primaryKey: "uuid", // Want "payID" primaryKey, but right now it might not even be present.
            explicitIndexes: ["name"]           
    ]
}

但是,我得到以下错误:

| Error 2013-04-18 11:04:16,533 [localhost-startStop-1] ERROR CassandraOrmGrailsPlugin  - Exception adding ORM methods to gibb1.newCassa

我在这里发布这个问题是因为我找不到插件开发人员的联系信息:https://github.com/bflorian/cassandra-orm
非常感谢您的帮助。

ncecgwcz

ncecgwcz1#

使用cassandra orm插件,您必须手动创建列族,如果这些列族创建不正确,它将抛出奇怪的错误。
是否创建了柱族?

相关问题