'objectbox flutter select specific property or get all object which have unique property value
I have an object entity in which i store many fields including clientNumber and clientName . I know that i can use property query on the clientNumber field but i wouldn't get the clientName, i also know that in objectbox for java there is a filter method that might solve my problem, but appart from retrieving all the clients and filtering data manually i don't know any other way to do it with flutter .
Could you tell me if there is a more elegant way to achieve the same result ?
Thank you by advance for your answer, and for the great product that is objectbox
Solution 1:[1]
You want to have a look at regular queries (not property queries). I imagine it could look like something like this:
Query<Client> query = box.query(client_.clientName.equals('Joe')).build();
List<Client> joes = query.find();
Now, having a the entire object(s), you can easily access any property.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Markus Junginger |
