我一直收到这个错误。
The primary key is set to `id`, but no such attribute was found on the model.
我的数据库中的表不使用任何主键,也没有关于如何在sails中禁用主键属性的教程。
有没有办法在不指定id属性或主键的情况下查询模型?
我正试图找到一个解决以下问题的方法。
我有许多N客户机(这个数字固定在5000和6000之间)和Server。
此服务器具有客户端的本地cache,其中存储每个客户端的一些数据。
public class Client
{
public bool inGroup;
}
此服务器定期查询某些数据库,并获取这些clients的列表,并更新其本地缓存。每当发现来自数据库的新数据与cache之间的差异(客户机数据只是一个cache)时,就必须通知特定的客户端。
现在,我不知道应该实现PULL还是基于PUSH的解决方案。如果选择PULL,那么就意味着每个客户端都会在30分钟左右的某个固定时间内询问
我用的是0.11.2版本的帆。下面的代码是
config/models.js s.js
在我的帆里应用
/**
* Default model configuration
* (sails.config.models)
*
* Unless you override them, the following properties will be included
* in each of your models.
*
* For more info on Sails models, see:
* http://sailsjs.org/#!/documentation/co