Skip to content
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

Behavior when an alias matches some existing table name #1091

Open
thenbe opened this issue Jul 29, 2024 · 3 comments
Open

Behavior when an alias matches some existing table name #1091

thenbe opened this issue Jul 29, 2024 · 3 comments
Labels
bug Something isn't working typescript Related to Typescript

Comments

@thenbe
Copy link

thenbe commented Jul 29, 2024

Hi. I'm just wondering whether example 2 (playground link below) is expected behavior (known edge case, won't fix, etc) or if it's a bug. I skimmed through the codebase/issues but couldn't find anything similar.

Minimal reproduction

Kysely playground: link

Use case

I encountered this in a db where a view is used as a helper for some tables. For example:

await db
	.selectFrom("person_details_view as person")
	.select(["some_field_that_exists_in_table_but_does_not_exist_in_view"])
	.execute();
@koskimas
Copy link
Member

That's a bug. Thanks for bringing this up!

@koskimas
Copy link
Member

Might already be fixed (by accident) in the v0.28 branch.

@igalklebanov igalklebanov added bug Something isn't working typescript Related to Typescript labels Jul 29, 2024
@thenbe
Copy link
Author

thenbe commented Sep 6, 2024

Might already be fixed (by accident) in the v0.28 branch.

I can reproduce the bug on the latest v0.28 branch (points to 5d38c1b at time of writing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working typescript Related to Typescript
Projects
None yet
Development

No branches or pull requests

3 participants