P2GR / datamapper

CodeIgniter Datamapper
Other
35 stars 23 forks source link

count() producing incorrect SQL #11

Open jamieburchell opened 9 years ago

jamieburchell commented 9 years ago

Just come across an issue with the count function generating the wrong SQL and found an exact match of the issue described here:

http://stackoverflow.com/questions/14381220/codeigniter-datamapper-orm-generating-wrong-query

I've not been able to figure out how to fix this. It's something in the library around lines 2480 generating SQL $other_model . '_id' where in my use case it should have been '.id'. I don't know enough about how this works to know for sure that wouldn't break other use cases.

saekort commented 9 years ago

I'll look into it :) Thanks.