j4mie / idiorm

A lightweight nearly-zero-configuration object-relational mapper and fluent query builder for PHP5.
http://j4mie.github.com/idiormandparis/
2.01k stars 369 forks source link

where_id_in with joints is broken #346

Closed kkrell2016 closed 2 years ago

kkrell2016 commented 5 years ago

Hi If i join 2 tables with the same pk named ID the where_id_is function works great. But the where_id_in function doesn't rename the ID column to tablename.ID as where_id_is would do.

So the query fails.

treffynnon commented 5 years ago

Would you be able to look into submitting a pull request to patch this and/or add a regression test to work against?

treffynnon commented 5 years ago

Could you post some code demonstrating this I problem please?

kkrell2016 commented 5 years ago

I am sorry that you have to wait so long.

I can't find the old code at the moment, but I had two tables with a column called ID. I try to remember..... Let's say table user and table company. I have created a user-> left_outer_join company on user.company = company.id. It occurred later on select_many, because id was ambiguous. I tried to select it with user.id, but no success.

treffynnon commented 2 years ago

Closing this as we've had no further reports - can reopen if needed.