我有一个标准 POJO,其中包含一组属性。 POJO已经被注解为@Document
,以便在MongoDB中作为Document持久化。
如何(注释??)我可以忽略/避免 POJO 中的属性之一被持久化?
最佳答案
@Transient
注释它是。见 http://static.springsource.org/spring-data/data-document/docs/current/reference/html/#mapping-usage-annotations
https://stackoverflow.com/questions/8254856/
相关文章:
Mongodb - 运行 "mongo"和 "mongod"数据库之间的区别
mongodb - 使用聚合框架使用 MongoDB 进行组计数
node.js - 如何使用 Mongoose Promise - mongo
mongodb - Mongo "prealloc"文件占用空间
mongodb - sudo service mongodb restart 在 ubuntu 14
node.js - 什么是Procfile?和 Web 和 Worker
mongodb - 如何在 Mongo 中进行 "NOT IN"查询?
python - 如何将 pymongo.cursor.Cursor 转换为字典?