对数据进行建模
在本节中,您可以学习;了解如何在 Mongoid 中对数据进行建模。
Include the Document Module in Your Model: Learn about the
Document
module.字段类型 :了解可在 Mongoid 中用于定义MongoDB文档模式的字段类型。
自定义字段行为 :了解如何自定义 Mongoid 中的字段行为,以满足您的应用程序要求。
继承 :了解如何在模型类中实现继承。
文档验证 :了解如何为模型类创建文档验证规则。
Customize Callbacks for Data Models: Learn how to implement callbacks to customize the life cycle of your models.
关联 :了解如何创建和管理模型类之间的数据关联。