objectbox / objectbox/objectbox-java

ObjectBrowser: not possible to add filter based on relation-ID

未关闭
#1,057 2 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

enhancement
主要语言
Java
星标
4.6k
派生
311
PR 合并指标
30 天内没有已合并 PR

描述

🚨 First, please check:

  • existing issues,

As far as I searched the open and closed issues with keyword "browser", I couldn't find anything related.

Curiously, I couldn't find anything in the docs about the ObjectBrowsers' usage and setup (aside of the changelog), is it deprecated now?

This page gives me a 500-code page right now...

The FAQ doesn't mention usage of the objectbrowser

Describe the bug
If I try to filter the data in the objectbrowser for an Entity that is participating as a target in an ToMany-relation, the objectbrowser-filter feature does not let me choose any operators for the ID-property for the ToOne-backlink.

Basic info (please complete the following information):

  • ObjectBox version (are you using the latest version?): 3.1.2 on a fresh test-project
  • Reproducibility: always
  • Device: Galaxy S20 FE (does not seem related to execution of this specific bug in ObjectBrowser)
  • OS: Android 12

To Reproduce
Steps to reproduce the behavior:

  1. Extract the attached demo-project objectboxtest.zip
  2. Open the project in Android Studio
  3. Compile and start the app on an emulator or device
  4. Leave the app open
  5. On the terminal, execute command adb forward tcp:8090 tcp:8090
  6. On the desktop, open a browser and open objectbrowser at http://localhost:8090/#/data/Login/page-1
  7. Add a filter for the Login-table
  8. As the filtered property, select userId
  9. Try to select the operator, but only choice from the popup is No data available
  10. No dice!

Expected behavior
As the property userId is a Long, I would expect the operator-popup to give me at least the choice to select = to filter the table for specific rows, so that I can filter a longer list of data for specific items.

Code
If applicable, add code to help explain your problem.

  • Include affected entity classes.
  • Please remove any unnecessary or confidential parts.
  • At best, link to or attach a project with a failing test.

objectboxtest.zip

Logs, stack traces
If applicable, add relevant logs, or a stack trace.

  • For build issues, use --stacktrace for the Gradle build (./gradlew build --stacktrace).
  • For runtime errors, check Android's Logcat (also check logs before the issue!).

There are no build-issues or runtime-errors to be observed. Even the objectbrowser does not issue any warnings at any time.

Additional context
Add any other context about the problem here.

  • Is there anything special about your app?

The only special thing about this might be the use-case for the filtering-feature in the objectbrowser.
Otherwise, it is a very simple demo-setup according to the Get-Started-docs (aside from the objectbrowser-setup, which I had to derive from my real app-project, since I couldn't find any setup-docs for it anymore).

  • May transactions or multi-threading play a role?

Nothing of the like is used here.

  • Did you find any workarounds to prevent the issue?

I tried the workaround mentioned here to being able to filter data with the userId in the objectbrowser, but sadly it didn't make any difference.

It would be really nice to be able to filter specific dependent data from relations in the objectbrowser, as long as a dedicated relations-browser feature is missing.

Thank you for your support!

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

使用附带的 objectboxtest.zip,启动应用,运行 adb forward tcp:8090 tcp:8090,并在 ObjectBrowser URL 中复现该筛选器。检查 ObjectBrowser 对 userId 关系 ID 的筛选行为;当运算符弹窗提供 = 并筛选出相关行时即表示完成,如有需要,记录相关设置。

由索引模型根据 Issue 内容生成。

评估

技术栈
android, java
领域
databases, mobile-dev
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。