Skip to content

data browser not showing the values of byte[] type #1033

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
LeoXJ978 opened this issue Dec 4, 2021 · 2 comments
Closed

data browser not showing the values of byte[] type #1033

LeoXJ978 opened this issue Dec 4, 2021 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@LeoXJ978
Copy link

LeoXJ978 commented Dec 4, 2021

When model has a field of byte[], though the values seem correctly persisted, data browser shows blank for the field

Basic info (please complete the following information):

  • ObjectBox version (are you using the latest version?): 3.0.1
  • Reproducibility: [e.g. occurred once only | occasionally without visible pattern | always]
  • Device: Huawei Mate 9
  • OS: Android 9

To Reproduce
Steps to reproduce the behavior:

  1. Put a field of byte[]
  2. assign some values, then persist the model
  3. check the field in data browser

Expected behavior
the values should be shown

@LeoXJ978 LeoXJ978 added the bug Something isn't working label Dec 4, 2021
@greenrobot-team
Copy link
Member

Confirmed, thanks for reporting!

The values are actually returned from the database, but not in a format that can be displayed. Example:

http://localhost:8090/api/query?entity_name=Note&offset=0&limit=50
{ "data":
 {
 "offset": 0,
 "fields": ["id", "text", "date", "bytes", "authorId"],

 "count": 3, "objects": [
  ["1", "This is a note for Bob", "1638789338241", "\u0001\u0002\u0003", "1"],
  ["2", "Write a demo app for ObjectBox", "1638789338242", "\u0001\u0002\u0003", "1"],
  ["3", "Thanks for your note, Alice", "1638789338242", "\u0001\u0002\u0003", "2"]
 ]
}
}

@greenrobot-team greenrobot-team added this to the 3.1.0 milestone Dec 20, 2021
@greenrobot-team
Copy link
Member

This is fixed in the 3.1.0 release. Byte arrays are now shown as Base64 encoded values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants