SailsJS Schema Name Issue

2019-08-13 07:34发布

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'
 }
} 

2条回答
闹够了就滚
2楼-- · 2019-08-13 08:10

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.

查看更多
Emotional °昔
3楼-- · 2019-08-13 08:33

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). :)

查看更多
登录 后发表回答