English 中文(简体)
mongoid 包含软删除的文档
原标题:mongoid include soft deleted document

蒙古人支持软删除

include Mongoid::Paranoia

假设我从一个收藏中 软软地删除了一份文件

现在我需要一个查询 包括从收藏中删除的软文件

我怎样才能做到呢?

我是否有必要为此制定单独的方法?

谢谢 谢谢

问题回答

您可以通过查询查找所有已删除的文档

 Model.deleted

如果您想要找到带有特定条件的已删除文档,

 Model.deleted.where(:field => value)




相关问题
Scrolling of a Document

I m working on an application in c#, which reads a pdf document. As we all know we have hand tool in most of the pdf reader, which is used to scroll the document. My issue is when I use the hand tool ...

The strangest thing with ob_start and headers

ob_start and all the headers did not work on my webpage. I searched though my whole code and did not find anything wrong. Then I deleted all my code and placed a Header Location at the top of the ...

Word document in ASP.NET page (controlled by the page)

I want to display a Word document in my ASP.NET page, and I want to be able to highlight text in the document according to events that happen on the page (like button clicks). Is it possible? Thanks....

make document available for download through java/servlet

I need to know if there is a way in java/servlet to make documents(doc,pdf) stored in database available for download to users in requested way(please see below), for example there is a web page and ...

Document library in .NET

I m looking for document library. Which allow users to tag files in certain categories but let files saved on PCs in network. This database let users search on intranet website. And use IIS as Web ...

热门标签