schotime / NPoco

Simple microORM that maps the results of a query onto a POCO object. Project based on Schotime's branch of PetaPoco
Apache License 2.0
848 stars 302 forks source link

Trouble with double underscore and MySQL #661

Closed redarccoder closed 2 years ago

redarccoder commented 2 years ago

Good day, well, this is kind of weird, I have been having trouble while working with variables with a double (or more) underscore "__" in my variable names.

For example, if I have a property like this: imagen

It will not map the value of my tables/views while doing a QueryAsync, even with the header of ExplicitColumns, but, strangely enough, if I declare it like this: imagen The variable will get the values correctly.

This generates a problem for me, since I generate interfaces for my Angular and react projects where the property names are declared with the same name and (compatible) data type.

Another option would be to refactor my database to use pascal or camel case to name my columns, but that's just too much of a work around solution

BTW, I'm working with .Net 6 imagen

redarccoder commented 2 years ago

Well, it's been a week and there has been no update on this, and, I see issues with 1 month or older, sadly, I had to switch my ORM, my old project doesn't use this style of table and column naming, so, it wasn't a problem there. If in the future this gets corrected then I'll switch back (since I have a class generator and it's kinda easy to do...

Even with this, I do recommend sticking to this project, lightweight and easy to use with great performance