Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法让 Raven 按 Id 字段对查询结果进行排序,就好像它是整数一样。因此,如果我执行以下查询,“cars/2”将出现在“cars/11”之前:
var cars = session.Query<Car>().OrderBy(c => c.ID);
您不应该依赖文档的 id 以任何方式进行排序。添加 CreatedAt 属性或类似的东西并使用它