Closed liquidiert closed 4 years ago
I've got to use []string because I need float precision and []float isn't supported yet btw
I'll try to reproduce that on the RPi and get back to you.
Thanks @vaind 👍 I made a repo with simple dummy code for you ;)
https://github.com/liquidiert/obx_rpi_bug
There was an issue with the objectbox-c not reporting the right value in obx_supports_bytes_array()
. This caused the Go lib to use vector-based methods which in some cases failed (on large objects). We have released a new version of the C library (v0.8.2) so in order to resolve the issue for yourself, please update, e.g. using the install.sh
script in this (Go) repo..
Additionally, I've noticed your example silently ignores all errors (the _
underscore secondary return in many calls). If that hasn't been the case, you'd have got an actual error text related to the issue above. As general advice, you should almost never ignore errors but rather act upon them (e.g. fail method execution and propagating them).
Ah ok didn't thought there were still errors from the underlying c library but good to know. And thanks! Closing 👍
I'm currently facing an odd behaviour of queries on, and that's probably important, the raspberry pi.
Normal behaviour of a query with a condition like
Record_.Patient.Equals(patient.Id)
, wherePatient
is another entity and linked via one (Patient) to many (Record) andpatient.Id
is the ObjectBox id, to return a slice of all records that match the condition. Records also has an attribute Points which is the "ObjectBox native type" []string.So the problem now is, that if the Points attribute contains more than roughly 500 strings
Find()
returns an empty slice. ThoughCount()
and other methods still work perfectly fine.My current workaround is to use
FindIds()
and get the Points viaGetMany()