8000 withSchema does not work with insert/create · Issue #426 · romeerez/orchid-orm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

withSchema does not work with insert/create #426

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
kvcpr opened this issue Oct 30, 2024 · 1 comment
Open

withSchema does not work with insert/create #426

kvcpr opened this issue Oct 30, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@kvcpr
Copy link
kvcpr commented Oct 30, 2024

I have a table defined with schema property.

export class SomeTable extends BaseTable {
	readonly table = 'some_table';
	readonly schema = 'diff_schema';
}

When I'm trying to insert data via:

db.some_table.insert({...});

it generates query like:

INSERT INTO "some_table"(....

when expected one is:

INSERT INTO "diff_schema"."some_table"(....

was also trying with withSchema function but with same results.

@romeerez romeerez added the enhancement New feature or request label Oct 31, 2024
@romeerez
Copy link
Owner

Apparently, this is not yet supported, and I'm afraid that OrchidORM isn't a good pick for you because of this.

I did some support of custom schemas here and there, but there are a lot of things to do to ensure the full support of this, and this is quite a big feature to support, since custom schemas can pop up in different parts of queries: updates, creates, deletes, joins, from clauses, relations between tables in different schemas, so this won't be ready any time soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants
0