henkmollema / Dommel

CRUD operations with Dapper made simple.
MIT License
634 stars 100 forks source link

Missing single quotes around generated SQL #260

Closed jorismathijssen closed 3 years ago

jorismathijssen commented 3 years ago

I'm creating a select query with a predicate: userItem => userItem.UserId == userId Where userItem.UserId and userId are both Guids.

This works like expected except that the generated SQL is: select * from [Users] where ([UserId] = df29664d-e6fe-4681-a693-6868a90cfb95)

The correct sql for this select query is: select * from [Users] where ([UserId] = 'df29664d-e6fe-4681-a693-6868a90cfb95')

Am i doing something wrong or is this not possible right now?

henkmollema commented 3 years ago

This is probably due to an issue introduced in #254. Can you try again with v2.3.2?

jorismathijssen commented 3 years ago

Thank you very much @henkmollema. It is working again. Glad to see parameters in the SQL instead of the direct value :)

Also thank you for this great work!

henkmollema commented 3 years ago

Welcome, and thanks for the bug report!