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

QueryBuilder->hasTableColumn does not respect DB connection #24

Open
jesperbjerke opened this issue Jul 31, 2017 · 2 comments
Open

QueryBuilder->hasTableColumn does not respect DB connection #24

jesperbjerke opened this issue Jul 31, 2017 · 2 comments

Comments

@jesperbjerke
Copy link

I have a multi-tenant database setup, and when trying to query a model I get "Unknown column 'id'". Turns out the method \Unlu\Laravel\Api\QueryBuilder::hasTableColumn calls Schema::hasColumn without setting connection first. Should be:

private function hasTableColumn($column)
{
    return (Schema::connection($this->model->getConnectionName())->hasColumn($this->model->getTable(), $column));
}
@walliby
Copy link

walliby commented Oct 16, 2017

I am seeing this error as well when passing column names

@markwalet
Copy link

When are you fixing this?

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

Successfully merging a pull request may close this issue.

3 participants