title: ObjectBox: problem opening in Dart a DB file created in Java
body: <p>I had a running app in Java on Android, and now I try to migrate it to Flutter/Dart.  So I re-created the models in Dart and tried the best to match the types with Java.  One thing I noticed that can't be exactly matched is model inheritance in Java that's not supported in Dart.  For that I duplicated all properties originally in parent class into children classes.  My test app first created an empty DB and runs on Linux and Android with basic gets and puts.</p>
  <p>Hoping to use the same DB of the Java app, then I copied a DB file that was created and is still being used by the Java app on Android and put it in place for the Dart app.  I also copied the model json file so that hopefully the UID's can be matched.  Run on Linux, it crashes and reports the following errors, which basically means little to me:</p>
  <pre><code>Launching lib/main.dart on Linux in debug mode...
  Connecting to VM Service at ws://127.0.0.1:40207/ZJhSLNAdprc=/ws
  Error handling 'checkPlatformOverride' custom request: method not available: ext.flutter.platformOverride
  Error handling 'checkBrightnessOverride' custom request: method not available: ext.flutter.brightnessOverride
  Error handling 'checkIsWidgetCreationTracked' custom request: method not available: ext.flutter.inspector.isWidgetCreationTracked
  Error handling 'serviceExtension' custom request: method not available: ext.flutter.inspector.setPubRootDirectories
  Lost connection to device.
  Exited (sigterm)
  </code></pre>
  <p>Then I tried to launch it on Android, I got exception messages, like</p>
  <blockquote>
  <p>ObjectBoxException (ObjectBoxException: failed to create store: 10501
  Cannot change the following flags for Property rightToLeft (6, Bool)
  (Language) from 4 to 0 (problematic flags: 4). Consider creating a new
  property instead. Please check the docs on data model migration and
  UIDs.)</p>
  </blockquote>
  <p>I checked the json file of the Java app, yes, there is the 'flags' field like:</p>
  <pre><code>   {
        &quot;id&quot;: &quot;6:7344438006121386835&quot;,
        &quot;name&quot;: &quot;rightToLeft&quot;,
        &quot;type&quot;: 1,
        &quot;flags&quot;: 4
      }
  </code></pre>
  <p>But this property becomes in Dart</p>
  <pre><code>    {
        &quot;id&quot;: &quot;6:7344438006121386835&quot;,
        &quot;name&quot;: &quot;rightToLeft&quot;,
        &quot;type&quot;: 1
      }
  </code></pre>
  <p>The &quot;flags&quot; field got removed for some reason when building the DB routines.  Then I checked about other properties, the Java file has many properties that has the flags field.  Many of these flags fields got removed in Dart which only keeps a few.  I can't find much info on what these flags are, or why they are different between Java and Dart versions, or how to maintain them in Dart so that the DB file can be treated compatibly.</p>
  <p>Any suggestion please?</p>