Created
April 3, 2011 04:17
-
-
Save liwh/900175 to your computer and use it in GitHub Desktop.
这里记录mongo class的常见错误
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Aa | |
include Mongoid::Document | |
embedded_in :Bb,:inverse_of => Aas | |
end | |
这是,我们不能直接调用Aa.first了,会报Exception: Mongoid::Errors::InvalidCollection,因为,我们不能直接调用一个embedded document的 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment