2007-11-08
请教compass如何映射java.util.Map类型
关键字: compass
现在实体设计有需要用到java.util.Map,但是在这个属性加@SearchableComponent就报but no class mapping was found for [java.util.Map],具体的信息如下:
Caused by: org.compass.core.mapping.MappingException: Tried to resolve ref-alias for property [articles] in alias [test], but no class mapping was found for [java.util.Map]
这个错误是因为compass不支持map类型吗?有什么思路可以解决,谢谢!
我的配置如下:
@SearchableComponent
@OneToMany(mappedBy="test")
@MapKey(name="title")
public Map<String, Article> getArticles() {
return articles;
}
Caused by: org.compass.core.mapping.MappingException: Tried to resolve ref-alias for property [articles] in alias [test], but no class mapping was found for [java.util.Map]
这个错误是因为compass不支持map类型吗?有什么思路可以解决,谢谢!
我的配置如下:
@SearchableComponent
@OneToMany(mappedBy="test")
@MapKey(name="title")
public Map<String, Article> getArticles() {
return articles;
}
- 16:11
- 浏览 (415)
- 论坛浏览 (525)
- 评论 (2)
- 分类: java
- 相关推荐
- 浏览: 40838 次

- 详细资料
搜索本博客
我的相册
{EADD2367-2334-4234-2434-231181485467}0
共 1 张
共 1 张
链接
- The Tapestry sample applications
- ruby
- Lucene
- Maven 2 简明学习指南(2)
- jsf
- 石头记
- srpingide
- 使用attachment_fu上传
- rails 文件上传
- ruby on rails 实现多文件的上传
- Ruby 多文件上传并写入数据库
- Hibernate Search牛刀小试
- springside分页
- 用Acegi Security来保护Grails应用
- 精通 Grails: 构建您的第一个 Grails 应用程序
- Chinese User Guide
- Rails宝典之第五十二式: 使用Checkbox来更新
- ruby 分页
- ruby 不错的分页
- js效果
- 很多值得看的多线程例子
- web监控
最新评论
-
compass中如何配置分词器 ...
spring配置compass分词器!经过本人多次尝试,以上楼的方法不正确,正确 ...
-- by cslgdxzhangpeng -
在Debian上部署Rails Apac ...
适合我这种新手看.
-- by yangzhihuan -
hibernate usertype 如何 ...
我也了解,确实像楼上说的。现在我想换用jpa,因为他有个@PreRemove @ ...
-- by biaoming -
hibernate usertype 如何 ...
UserType无法得知状态
-- by Quake Wang -
发现一个在线学习groovy的 ...
按照教程,练习了一把,感觉不错。
-- by yf1975






评论排行榜