Skip to content

Query missing one record and invalid field assignment during read operation #550

@lberbey

Description

@lberbey

Hi guys,

First of all, sorry for my english (I'm french).

I have two issues on the same project :

  • Invalid return on query : I'm missing one record
  • Invalid field assignment during read operation

Sorry if I'm wrong. Your product is really good and quite easy to use. I'm really happy with it.
I tried to understand sub classes process to fix this but guys, I'm just a simple developer and all the work on ByteArray, Buffer... is far to complex for me 👼 .

Basic info:

  • ObjectBox version: 2.1.0
  • Flutter/Dart SDK:
Flutter 3.10.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f468f3366c (2 weeks ago) • 2023-07-12 15:19:05 -0700
Engine • revision cdbeda788a
Tools • Dart 3.0.6 • DevTools 2.23.1
  • Reproducible: always
  • Build OS: Windows 10 22H2
  • Deployment device or OS: Android 12 SKQ1.211006.001
  • flutter pub deps --no-dev
Dart SDK 3.0.6
Flutter SDK 3.10.6
objectbox_issue 0.1.0
|-- flutter 0.0.0
|   |-- characters 1.3.0
|   |-- collection 1.17.1
|   |-- js 0.6.7
|   |   '-- meta...
|   |-- material_color_utilities 0.2.0
|   |-- meta 1.9.1
|   |-- sky_engine 0.0.99
|   '-- vector_math 2.1.4
|-- objectbox 2.1.0
|   |-- ffi 2.0.2
|   |-- flat_buffers 2.0.5
|   |-- path 1.8.3
|   |-- collection...
|   '-- meta...
|-- objectbox_flutter_libs 2.1.0
|   |-- path_provider 2.0.15
|   |   |-- path_provider_android 2.0.27
|   |   |   |-- flutter...
|   |   |   '-- path_provider_platform_interface...
|   |   |-- path_provider_foundation 2.2.4
|   |   |   |-- flutter...
|   |   |   '-- path_provider_platform_interface...
|   |   |-- path_provider_linux 2.1.11
|   |   |   |-- xdg_directories 1.0.1
|   |   |   |   |-- meta...
|   |   |   |   '-- path...
|   |   |   |-- ffi...
|   |   |   |-- flutter...
|   |   |   |-- path...
|   |   |   '-- path_provider_platform_interface...
|   |   |-- path_provider_platform_interface 2.0.6
|   |   |   |-- platform 3.1.0
|   |   |   |-- plugin_platform_interface 2.1.5
|   |   |   |   '-- meta...
|   |   |   '-- flutter...
|   |   |-- path_provider_windows 2.1.7
|   |   |   |-- win32 5.0.6
|   |   |   |   '-- ffi...
|   |   |   |-- ffi...
|   |   |   |-- flutter...
|   |   |   |-- path...
|   |   |   '-- path_provider_platform_interface...
|   |   '-- flutter...
|   '-- objectbox...
'-- uuid 3.0.7
    '-- crypto 3.0.3
        '-- typed_data 1.3.2
            '-- collection...
  • flutter doctor -v
[√] Flutter (Channel stable, 3.10.6, on Microsoft Windows [version 10.0.19045.3086], locale fr-FR)
    • Flutter version 3.10.6 on channel stable at C:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f468f3366c (2 weeks ago), 2023-07-12 15:19:05 -0700
    • Engine revision cdbeda788a
    • Dart version 3.0.6
    • DevTools version 2.23.1

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at C:\AndroidSDK
    • Platform android-33-ext4, build-tools 33.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-9505619)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.24)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.11.33328.57
    • Windows 10 SDK version 10.0.20348.0

[√] Android Studio (version 2022.1)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-9505619)

[√] VS Code, 64-bit edition (version 1.80.1)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.68.0

[√] Connected device (4 available)
    • M2002J9G (mobile) • 1eabc81d • android-arm64  • Android 12 (API 31)
    • Windows (desktop) • windows  • windows-x64    • Microsoft Windows [version 10.0.19045.3086]
    • Chrome (web)      • chrome   • web-javascript • Google Chrome 115.0.5790.110
    • Edge (web)        • edge     • web-javascript • Microsoft Edge 115.0.1901.188

[√] Network resources
    • All expected network resources are available.

• No issues found!

Steps to reproduce

  1. Load the project from here
  2. Add some breakpoints
main.dart l.187
main.dart l.191
main.dart l.194
objectbox.g.dart l.465
objectbox.g.dart l.469
  1. Execute the project (all breakpoints will be traversed during main.dart execution)

Expected behavior

  1. On main.dart l.191 recipes list should be equal to recipes list on main.dart l.187 like it worked for shops list just above
  2. On main.dart l.194 days[0] should contains 1 item in lunchMenu and 2 in dinnerMenu properties

Code

  • objectbox.g.dart l.465 : value seems available before dbLunchMenu assignment
    objectbox - objectFromFB - before dbLunchMenu
  • objectbox.g.dart l.469 : value is unavailable after dbLunchMenu assignment
    objectbox - objectFromFB - after dbLunchMenu

Additional context

  • I find one workaround for the field assignment during read operation : replace properties lunchMenu and dinnerMenu by menu and dbLunchMenu and dbDinnerMenu by dbMenu but I'm not shure why is it working 😭.

Thanks for your time 🍻 .

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions