atk4 / data

Data Access PHP Framework for SQL & high-latency databases
https://atk4-data.readthedocs.io
MIT License
273 stars 46 forks source link

Strip schema from table for Join::foreign_field guess #1003

Closed mvorisek closed 2 years ago

mvorisek commented 2 years ago

related with https://github.com/atk4/data/pull/1002, at least Join probably needs a simillar fix

/cc @samsouthardjr

samsouthardjr commented 2 years ago

related with #1002, at least Join probably needs a simillar fix

/cc @samsouthardjr

I'm not an expert at Join or github, but you're right. The exact same fix should be made at line 357 of Join.php. Are you going to put that into this branch, or were you looking for me to do so? I've never contributed to a pull request that someone else has started, but if you're looking to me to do it I can always try and learn.

mvorisek commented 2 years ago

Technically you can open a PR into join_name_guess_from_table_with_schema branch, but I fixed it - the only thing to fix is the test and you can offer (such small) fix using a GH suggestion:

image

samsouthardjr commented 2 years ago

Technically you can open a PR into join_name_guess_from_table_with_schema branch, but I fixed it - the only thing to fix is the test and you can offer (such small) fix using a GH suggestion:

image

I couldn't find that button -- is it in githubdesktop, maybe?

In any case, I'll just comment on it here, since it's your pull. The current pull doesn't address that the same change is needed in Join's hasMany() method, at line 357.

mvorisek commented 2 years ago

Impl. fixed, but Join should be dropped sooner or later with Model impl. to support full/nested modelling.