objectbox-go | Fast Golang database for easy Go structs | Database library
kandi X-RAY | objectbox-go Summary
kandi X-RAY | objectbox-go Summary
Fast Golang database for easy Go structs/objects persistence; plus out-of-the-box Data Sync
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of objectbox-go
objectbox-go Key Features
objectbox-go Examples and Code Snippets
Community Discussions
Trending Discussions on objectbox-go
QUESTION
Unfortunately, ObjectBox Go's docs provide no information about deletion of entire type structure "powered" by ObjectBox.
Let's say we have a struct
...ANSWER
Answered 2020-Sep-08 at 08:37Currently, the ObjectBox code generator doesn't delete entities because it works with partial input information (a single file at a time) and therefore it doesn't know whether you have removed an entity or it will be in the next file the generator is called for.
I've created a follow-up issue/feature request on GH: https://github.com/objectbox/objectbox-generator/issues/22
If you really needed to remove the entity NOW, until the removal feature is added to the generator: the current workaround, would be to manually update the objectbox-model.json
, removing the entity JSON code block defining it and adding its uid
to the retiredEntityUids
list to avoid reuse of the same UID (which would break things). Additionally, the same has to be done for the removed properties, indexes, and relations (each has its retired*Uids
list). After the generator is re-run, the entity would be removed from the objectbox-model.go
.
I don't recommend doing this as it's easy to make an error when manually editing the model JSON file, potentially causing a loss of data. If you can, wait for the generator to support the removal.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install objectbox-go
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page