objectbox / objectbox/objectbox-java

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

Đang mở
#589 15 bình luận 3 reaction 1 người được giao Xem trên GitHub

@greenrobot-team đang làm issue này rồi.

Từ ngày 26/2/2019.

bug
Ngôn ngữ chính
Java
Star
4.6k
Fork
311
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.