Closed iMusicJJ closed 1 year ago
Cool. I'll take a look at this as I've been meaning to revisit/update this repo.
Let me know if you need an example. We initially ran into the issue because our Test-Generator Shift failed to create any factories. Luckily it was a quick fix
Sure. Before/after examples are always good. Can just be a few lines.
I'll try to describe it here.
Basically it comes down to us establishing a new database a few years ago, along with some new internal systems.
The new database still needed a few of the legacy tables from the old database (which is still very much in use by the old system).
We made a new LegacyModel which they would extend, and they simply had another DB connection.
It looks something like this.
id | item_id | title |
---|---|---|
1 | 9874283 | For |
2 | 783245 | Bar |
id | width | height |
---|---|---|
9874283 | 50 | 20 |
783245 | 120 | 50 |
It's not ideal, but others might benefit from it.
It should be a pretty simple fix that just allows the package to use the fully qualified database table name.
I hope that makes sense?
If there's any problems, I can checkout an old commit and run it, to recreate the error.
Hi,
This PR is mainly created after a short patch allowed us to scratch our own itch. We have an old legacy database and a newer database which is our main datastore.
Some of our relationships are cross-database, and while this isn't traditional, it should now be supported with this patch.