-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Are ValueConverterAttributes supported? #5
Comments
I see what you're trying to do, and I agree that it would be useful. But it's not currently supported. This library is just a set of bindings between the underlying StaTypPocoQueries library, which handles the translation between the |
I have opened d-p-y/statically-typed-poco-queries#8 to track my request. |
Hi, I've implemented support for this feature in StaTypPocoQueries.Core. See issue #8 for more info. |
@d-p-y Thank you! I'll take a look and add the corresponding hooks in this library. |
This is now supported by v1.4.1. Thanks to @d-p-y for the support. |
I have a setup where I use a simple
ValueConverterAttribute
to save enums asString
in the database.Using StaTypPocoQueries.PetaPoco for querying of those pocos results in errors like:
I'm using
database.SingleOrDefaultAsync(x => x.SomeString == "SomeString" && x.SomeEnum == MyEnumType.SomeValue)
Now, in "pure" PetaPoco I did not have the problem, but I also had
database.SingleOrDefaultAsync(Sql.Builder.Where("[SomeString] = @0 AND [SomeEnum] = @1", "SomeString", Enum.GetName(typeof(MyEnumType), MyEnumType.SomeValue))
- which is to say I did the conversion of theConverter
manually in code.So I guess the question really is: Am I doing something wrong, or this this not a supported case to do?
The text was updated successfully, but these errors were encountered: