-
Notifications
You must be signed in to change notification settings - Fork 127
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
Possible bug - Enum with Flag attribute is not correctly handled #624
Comments
@lucwuyts - though I understand this problem, can you also specify some code to provide more context? Thanks |
Consider this enum:
When Functie has multiple flags, ToString() shows them concatenated with komma as separator. Like this:
I tried using this PropertyHandler:
In the Set function, the string "input" is null when there is more than 1 option set. |
Because the library doesn't work, i thought the parsing of such flag enum has to be done part per part, but this is not thrue.
so above Set function is much too complicated, sorry about that. But the problem remains off course. |
Upon further investigation, the [Flags]
public enum StorageType
{
File = 1,
Folder = 2,
Directory = 4,
Drive = 8,
InternalStorage = 16,
MemoryStorage = 32
} And this one is always returning |
This is now deployed at RepoDB v1.12.5-beta1. Can you upgrade and test it there? Thanks |
Closing this ticket now. Please do not hesitate to reopen or contact us ASAP if the issue is not fixed on your end. |
The library does not handle Enums with the Flag attribute correctly.
I tried to solve this with an PropertyHandler, but when more than 1 flag is set, the input field in the Get function is null.
So the original enum is not passed to this function
The text was updated successfully, but these errors were encountered: