MicroOrm.Pocos.SqlGenerator icon indicating copy to clipboard operation
MicroOrm.Pocos.SqlGenerator copied to clipboard

GetSelect with In Filter not supported

Open sgadoury opened this issue 8 years ago • 1 comments

Hi,

I'm using MicroOrm with Dapper and I have a little problem because I pass an array to GetSelect and final result is = instead on In even if in where (value1, value2) is right.  Here is a partial example of query executed when I look with Sql Profile.

Select ..... WHERE [table1].[LOAD_DATE] = (@LoadDate1,@LoadDate2) ',N'@LoadDate1 datetime,@LoadDate2 datetime',@LoadDate1='2016-05-20 00:00:00',@LoadDate2='2016-05-26 00:00:00'

Do you know if it is possible to fix it?  If not, can you give me access rights to change this in github?

If it is simpler for you, you could only change method ToWhere to be protected virtual and it will be OK for me.

Thank you

sgadoury avatar May 26 '16 16:05 sgadoury

Hi, thanks for use the library. That change makes sense and it doesn't seems to be hard. I can do the change but maybe by the end of this week.

If you want to contribute you can fork the repository and then send a pull request. I will be more than glad to accept contributions.

Other option is to override your GetWhere function for your specific class. On May 26, 2016 10:54 AM, "sgadoury" [email protected] wrote:

Hi,

I'm using MicroOrm with Dapper and I have a little problem because I pass an array to GetSelect and final result is = instead on In even if in where (value1, value2) is right. Here is a partial example of query executed when I look with Sql Profile.

Select ..... WHERE [table1].[LOAD_DATE] = (@LoadDate1,@LoadDate2) ',N'@LoadDate1 datetime,@LoadDate2 datetime',@LoadDate1='2016-05-20 00:00:00',@LoadDate2='2016-05-26 00:00:00'

Do you know if it is possible to fix it? If not, can you give me access rights to change this in github?

If it is simpler for you, you could only change method ToWhere to be protected virtual and it will be OK for me.

Thank you

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/Yoinbol/MicroOrm.Pocos.SqlGenerator/issues/8

ElNinjaGaiden avatar May 26 '16 17:05 ElNinjaGaiden