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

[BUG]: different table names #2882

Open
do4Mother opened this issue Aug 30, 2024 · 1 comment
Open

[BUG]: different table names #2882

do4Mother opened this issue Aug 30, 2024 · 1 comment
Labels
bug Something isn't working priority Will be worked on next qb/crud

Comments

@do4Mother
Copy link

What version of drizzle-orm are you using?

0.33.0

What version of drizzle-kit are you using?

No response

Describe the Bug

i use mysql and i have a simple query like this

marketDB
      .select()
      .from(product)

then i get error message like this

Your "id" field references a column "market_db`.`product"."id", but the table "market_db`.`product" is not part of the query! Did you forget to join it?

after i try to debugging dialect.ts in line

.

variable getTableName(f.field.table) will return market_db.product and then getTableName(table) return product

Expected behavior

should be return same table name

Environment & setup

No response

@do4Mother do4Mother added the bug Something isn't working label Aug 30, 2024
@L-Mario564
Copy link
Collaborator

Can you show me the definition for product table?

@L-Mario564 L-Mario564 added priority Will be worked on next qb/crud labels Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority Will be worked on next qb/crud
Projects
None yet
Development

No branches or pull requests

2 participants