-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
Hi Durran,
I would like to ask how i could include relation by using threadsafe database?
example :
Class Blog
include Mongoid::Document
...
has_many :comments
belongs_to :author
end
Blog, Comment & Author are using database blog_db with the same session, blog_engine.
blog = Blog.with(database: "blog_db", session: "blog_engine").first
how i could do like these:
comments = blog.comments #=> nil
author = blog.author #=> nil
they are not working yet and returning nil. But if I use standard methods they are exist, example:
Comment.with(database: "blog_db", session: "blog_engine").where(blog_id: blog.id).count #=> 10
Many thanks,
jack