Tag: 水印

如何获取水线logging的模型名称或模型类?

虽然与我在前面提到的问题有所不同,但它是相关的,因此想要链接它。 我一直在努力研究如何获得logging的模型名称(标识)或模型“类” (在sails.models中sails.models )。 所以,如果有waterlinelogging,我怎样才能find它的模型名称或类? 例子(当然,我知道模型是User但是这是一个例子): User.findOne(1).exec(function(err, record) { // at this point think that we don't know it's a `user` record // we just know it's some record of any kind // and I want to make some helper so that: getTheModelSomehow(record); // which would return either a string 'user' or the `User` pseudo-class […]