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

Saving a model with non-default connection #19030

Closed
vladsrynty opened this issue May 2, 2017 · 5 comments
Closed

Saving a model with non-default connection #19030

vladsrynty opened this issue May 2, 2017 · 5 comments

Comments

@vladsrynty
Copy link

  • Laravel Version: 5.4.21
  • PHP Version: 5.6.30
  • Database Driver & Version: Informix

Description:

Eloquent model with property $connection set to non-default fails on saving

Steps To Reproduce:

class Test extends \Eloquent {

protected $connection = 'non-default';
}

$test = Test::find($testID);
$test->prop = '123';

$test->save();

SQL error stating that table does not exist. (because it tries to save on a default connection)

@themsaid
Copy link
Member

themsaid commented May 2, 2017

Unable to replicate your issue, the model saves with respect to the specified non-default connection successfully, please check your code for further details about the failure.

@faralimite
Copy link

+1 here. I'm using yajra/laravel-oci8 and I have models with connection = 'oracle'; and I have error on saving. Select works.

I rolled back to 5.4.16 and it works.

@themsaid
Copy link
Member

themsaid commented May 4, 2017

I'm still unable to replicate, please share some steps to reproduce that I can use on a fresh laravel instance.

@faralimite
Copy link

yajra/laravel-oci8#279 have a look here.

@themsaid
Copy link
Member

themsaid commented May 5, 2017

Closing since we are unable to replicate, please report to the package maintainers.

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

No branches or pull requests

3 participants