SailsJS Schema Name Issue

孤人 提交于 2019-12-24 01:55:23

问题


I am trying to connect my SailsJS app to a postgres db that has another schema aside from 'public'

The schema name of the postgres DB that I am connecting to is 'sales'

Where am I am going wrong?

Thank you!

connection: 'postgres',
tableName: 'user__c',
meta: {
 schemaName: 'sales'
 },

attributes: {
name: {
 type: 'string'
 },
 picture_url: {
  type: 'string'
 }
} 

回答1:


It's been so long but still, this is still an issue with waterline-sequel (0.5.0) in the latest version of Sails (0.11.x), and it has not been resolved so far.

The meta.schemaName is present in the code, but it's currently for the decorative purposes (orphaned). :)




回答2:


Based on what you have written, nothing is wrong with the form and structure of your model definition.

Please include more information if you continue to receive an error.



来源:https://stackoverflow.com/questions/29262825/sailsjs-schema-name-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!