Closed this issue 10 years ago · 1 comments
在controller中处理类似下面的代码时,如果Post也enable了cache会导致expcetion:
Topic.includes(:posts).where(:status => 'published' )
查看了一下代码,发现在处理includes时,preloader会将ids当做Post的primary id去查找已经缓存的posts,但是在has_many中ids是Post的topic_id而不是Post的 primary id。
I think #13 has solved this, thanks.