Provide a way to force a refresh of the cached ToOne target
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 領域
- databases, mobile-dev
調査の方向性
まず ToOne リレーションシップ API の場所を確認し、既存の getTargetId() と target setter の動作を読みます。要求された refresh 操作を実装し、既知の box から関連エンティティを取得してキャッシュを更新し、そのエンティティを返すようにします。呼び出し側が box を手動で探さなくても、変更された target を refresh できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
When the target entity of a ToOne relationship is changed after it's resolved and cached, there is no way to force the target to refresh from the database.
Describe the solution you'd like
Provide a function that can be called that forces a new "get" from the box, caches the new entity, and returns it. This can be used when the app knows that the entity has been updated but wants those changes reflected in the related object.
Describe alternatives you've considered
As a workaround/alternative, the app can find the correct box, get an updated entity using the getTargetId(), then set the ToOne target entity to the updated entity. This works but requires a lot of extra code for something it feels like objectbox should be able to handle (especially since the ToOne relationship already knows the correct box for the get operation).
Additional context
Currently using this on Kotlin/Android.
- 主要言語
- Java
- スター
- 4.6k
- フォーク
- 311
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
objectbox/objectbox-java のほかの issue
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
objectbox/objectbox-java#1226 · コメント 2 件 ·
-
documentation enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
objectbox/objectbox-java#1225 · コメント 9 件 · リアクション 1 件 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
objectbox/objectbox-java#1223 · コメント 1 件 · リアクション 4 件 ·
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
objectbox/objectbox-java#1211 · コメント 1 件 · リアクション 3 件 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
objectbox/objectbox-java#1198 · コメント 1 件 ·
objectbox/objectbox-java の issue をすべて見る
似ている issue
-
Bug Java Platform: Java
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
getsentry/sentry-java#6138 · コメント 1 件 ·
-
bug needs triage p2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
GoogleCloudPlatform/DataflowTemplates#4273 · コメント 1 件 ·
-
[Studio][Bug] Bulk-deleting a full page of alert rules steps the page back while more rules remain オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/rocketmq-dashboard#4654 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100