objectbox / objectbox/objectbox-java

Adding non-null Kotlin property causes crash when getting existing entity

オープン
#589 コメント 15 件 リアクション 3 件 担当者 1 名 GitHub で見る

@greenrobot-team がすでに取り組んでいます。

2019年2月26日 から。

bug
主要言語
Java
スター
4.6k
フォーク
311
PR マージ指標
30日以内にマージされた PR はありません

説明

Edit: The original issue described below about default values has moved to #157.

This issue is now about correctly detecting not-nullable properties of Kotlin data classes.

Issue Basics

  • ObjectBox version (are using the latest version?): 2.2

I added a new int (not Integer) property into an existing entity. And I found that the new property values for existing record are all null instead of default value (0 in this case), and the the equal query will always return empty result.

box.query().equal( intProperty, 0) -> zero result
box.query().notEqual( intProperty, 0) -> zero result
box.query().isNull( intProperty ) -> non-empty result

Is this considered a bug? Or I should expect null for primitive property

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。