-
Notifications
You must be signed in to change notification settings - Fork 320
translate on different connection, uses default connection #283
Comments
see (laravel/framework#16103) After using the laravel parent connection fix we still have problems inserting translations on an other connection. We currently use this to be able to continue, but it is a bit ugly....
|
@reno1979 can you please make a pull request ? |
Inserting a pull does not seem to work. I also do not have the solution / fix for your code, so I can't suggest a fix. |
I would like to add a pull request, but did not figure out how. |
I think we need to setup the tests with a second db connection and make the tests fail asserting the expected behavior and the code above. If you need help about how to make a pull request try googling it. :-) |
@dimsav The tests are a good start. I will not be making a pull request, because then I suppose to have a source code change proposal. And that is the part that I have not figured out yet, I don't think google did either :P I hoped this plugin would benefit from the fixes in Laravel 5.4 regarding relations on other connections. |
Leaving this open in case somebody from the community wants to contribute. |
it's fixed |
When I have two connection possibilties (mysql1, mysql2) and I try the following:
This saves the new row with code value general into the mysql2 database, but the translations are never stored. (even when I also use the setConnection('mysql2') on each translate and save method)
also fails
update
When I dump the created model instance (using second connection) , it appears the realtion to the translation table has not the same value in its connection parameter.
It seems related to Elequent relations not using its parent connection, see this issue::
laravel/framework#9355
The text was updated successfully, but these errors were encountered: