You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Upgrading from Objectbox v1.5 to v2.x fails with index on unsupported property #712
Upgrading the objectbox instance from 1.5 to 2.x when having an @Index set on a Double field is impossible for existing apps.
A desired way of handling this would be to remove the @Index from the existing legacy data structure internally and let the app keep the data as before, making a migration to the new objectbox version possible and seamless.
Please fix this issue as an upgrade of the module is impossible.
Code
ObjectBox v1.5
@entity
public class Foo {
@Index private Double Lat;
@Index private Double Lng;
}
ObjectBox v2.3.4 @entity
public class Foo {
private Double Lat;
private Double Lng;
}
triggers runtime DbException: "io.objectbox.exception.DbException: Indexing of float and double is currently unavailable. Please remove the index on Property Lat (5, Double)"
Logs & stackstraces
io.objectbox.exception.DbException: Indexing of float and double is currently unavailable. Please remove the index on Property Lat (5, Double)
Misc
Is there anything special about your app?
No
May transactions or multi-threading play a role?
No
Did you find any workarounds to prevent the issue?
No workarounds found to date
Quoting from Stack Overflow:
Turns out that ObjectBox does not support removing @Index on a 2.x version for properties unsupported by @Index (float and double were allowed by error in previous releases).
We are already tracking this internally.
Until this is fixed I suppose the only workaround (make sure to test this, I have not verified this works) is to delete the entity and use a new one.
-Uwe
changed the title [-]Upgrading from Objectbox v1.5 to v2.x fails - [/-][+]Upgrading from Objectbox v1.5 to v2.x fails with index on unsupported property[/+]on May 21, 2019
@greenrobot-team the proposed workaround means that all objects inside the Entity will be lost which is not an option in our use case. Thank you for looking into the matter.
Activity
greenrobot-team commentedon May 21, 2019
Quoting from Stack Overflow:
Turns out that ObjectBox does not support removing
@Indexon a 2.x version for properties unsupported by@Index(float and double were allowed by error in previous releases).We are already tracking this internally.
Until this is fixed I suppose the only workaround (make sure to test this, I have not verified this works) is to delete the entity and use a new one.
-Uwe
[-]Upgrading from Objectbox v1.5 to v2.x fails - [/-][+]Upgrading from Objectbox v1.5 to v2.x fails with index on unsupported property[/+]mitjakoren commentedon May 21, 2019
@greenrobot-team the proposed workaround means that all objects inside the Entity will be lost which is not an option in our use case. Thank you for looking into the matter.