You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a class that has a String variable in it. Some instances of the class have the String set to something, but other instances just have it set to an empty string (i.e. "").
When I write the list of instances of this class to a LiteDB, I'm finding that the ones with an empty string are being written as [NULL]. So when I read them back from the database, these instances have Nothing in their String variable instead of "". This then causes a problem in my application which is not expecting the String variable to have a value of Nothing.
I know I could just check for Nothing, but I'm looking for a better solution that to have to check for Nothing every single time. Is there a way to either have LiteDB read an empty string instead of Nothing or is there a way I can inject and empty string inplace of Nothing when the class instances are loaded?
The text was updated successfully, but these errors were encountered:
I have a class that has a String variable in it. Some instances of the class have the String set to something, but other instances just have it set to an empty string (i.e. "").
When I write the list of instances of this class to a LiteDB, I'm finding that the ones with an empty string are being written as [NULL]. So when I read them back from the database, these instances have Nothing in their String variable instead of "". This then causes a problem in my application which is not expecting the String variable to have a value of Nothing.
I know I could just check for Nothing, but I'm looking for a better solution that to have to check for Nothing every single time. Is there a way to either have LiteDB read an empty string instead of Nothing or is there a way I can inject and empty string inplace of Nothing when the class instances are loaded?
The text was updated successfully, but these errors were encountered: