Symfony中Doctrine对应的Mongodb数据类型 data type
时间:2014-03-06 10:26:16
收藏:0
阅读:678
1. hash 就是 json对象
2. collection 就是 数组
3. 若要知道如何使用referenceOne, referenceMany, embbedDocument等
主要查看:
http://doctrine-mongodb-odm.readthedocs.org/en/latest/reference/reference-mapping.html
以上部分主要看yaml部分,就会知道如何编写 yml
了。
HasLifecycleCallbacks事件:
了解更多:
比较典型的yml:
Documents\User: fields: id: type: id id: true name: type: string email: type: string referenceMany: posts: targetDocument: Documents\BlogPost cascade: all Documents\BlogPost: fields: id: type: id id: true title: type: string body: type: string createdAt: type: date
Symfony中Doctrine对应的Mongodb数据类型 data type,布布扣,bubuko.com
原文:http://www.cnblogs.com/vincedotnet/p/3583683.html
评论(0)