2

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'
 }
} 
SFielder
  • 21
  • 1
  • Before someone tries to answer what you're doing wrong, why don't you explain more about what is going wrong with the code that you have? Is there more context you can provide to lead someone closer to a specific problem or area of confusion rather than "I'm confused fix all of this for me"? – clearlight Mar 25 '15 at 17:58
  • Says relationship user__c does not exist. It does not exist in the public schema which is why I am assuming that sails is altogether not seeing my schemaName declaration. – SFielder Mar 25 '15 at 18:02
  • @SFeilder thank you for the clarification. I am not familiar with the technology, just helping filter new questions. That information should help focus anyone who is capable of helping more on a targeted answer and improve your odds of a usable response. In general when asking questions here, consider how to provide all the context in the most succinct way possible including posting as relevant code as you can, where necessary (and not more than is needed). Good luck! – clearlight Mar 25 '15 at 18:04

2 Answers2

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

0

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.

Meeker
  • 5,979
  • 2
  • 20
  • 38
  • Here;s the exception that I am getting when performing a GET through postman:{ "error": "E_UNKNOWN", "status": 500, "summary": "Encountered an unexpected error", "raw": { "name": "error", "length": 99, "severity": "ERROR", "code": "42P01", "position": "102", "file": "parse_relation.c", "line": "984", "routine": "parserOpenTable" } } – SFielder Mar 26 '15 at 20:16
  • and why do you think it is a Shcema name issue? – Meeker Mar 26 '15 at 21:36