vasern / vasern

Vasern is a fast, lightweight and open source data storage for React Native

Home Page:https://vasern.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Property with false (boolean) value is undefined

apppro123 opened this issue · comments

I have an schema with a boolean element. If i now insert the value false into this element, first it shows me the whole objects with this element. But after i refresh the app the element in the object which i just inserted is gone. With value true everything is fine, it is just a mistake with false.
I dont know if this is meant to be like this, but it is a little bit weird to me.
I have then the problem that i cannot change this element because it doesnt exists.

Hi @apppro123, this issue has been reported earlier and fixed in version 0.2.94.

Please let me know if you have already updated to the latest version and still have the issue!

Unfortunately it is still not working with the new version (i have also deleted the build folder under android and deleted the app on the emulator and then rund the app again) and under package.json it shows me version 0.2.49.

Thanks for letting me know.
I’ll give it a look!

I think it was a typo (as you mention version 0.2.49). Just want to confirm that you got version 0.2.94?

My tests on both Android and iOS didn’t show the issue.

Can you post the schema and the update part of your code? It will be helpful for me to figure it out!

Yes it is a type. But i dont think it is related to my update part (the keys just disappear after restarting the app, nothing to do with update), but i can post the insert part.

export const CalendarSchema = {
name: "Calendar1",
props: {
Title: "string",
Color: "string",
Type: "string", //all, schedule, event or reminder
Deletable: "boolean",
DefaultCalendar: "boolean",
OnlineUserId: "?int"
}
}

//insert
let calendar = Calendar1.insert({
Title: title,
Color: color,
Type: type,
Deletable: deletable,
DefaultCalendar: defaultCalendar,
OnlineUserId: onlineUserId
}, true)[0];

Hi @apppro123, unfortunately, the issue doesn't appear on my test. (Please see image attached below)

Could you join our slack channel and send me a direct message? I'll help figure out the issue.
Join our slack channel here

image

The good news is that it is now working!!! The bad, that i have NO idea why it is now but wasnt yesterday or the day before... :(

I highly doubt it was React Native's cache that causes the problem.

For future reference, you can try to clear the cache when starting Metro Bundler with following command:

$ npm start -- --reset-cache

Some more about reset cache can find here

I will close this issue since it has been resolved. Also, feel free to reopen or create a new one again