balderdashy / balderdashy/sails

schemaName not working for sails-postgresql

Open
#6,779 4 comments 0 reactions 0 assignees View on GitHub
orm postgresql
Dominant language
JavaScript
Stars
22.8k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

I'm using sails v1.2.2 with sails-postgresql adapter. Looking for using Model with specific schemaName. But relation with mapped with default schemaName (public)

```
{

tableName : "t_role",
meta: {
schemaName: 'autorisation'
}
}
```

AdapterError: Unexpected error from database adapter: relation "public.t_role" does not exist

Contributor guide

Open the contributing guide

Research direction

Start with the Model configuration shown in the issue and trace how the sails-postgresql adapter handles meta.schemaName for relations. Reproduce the AdapterError with the autorisation schema, then verify that the relation resolves there rather than to public.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, postgresql
Domain
backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.