-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid Column key when using child properties with the BETWEEN keyword. #7935
Closed
derrickgw opened this issue
Jul 15, 2024
· 5 comments
· Fixed by #7965 · May be fixed by realm/realm-dart#1770
Closed
Invalid Column key when using child properties with the BETWEEN keyword. #7935
derrickgw opened this issue
Jul 15, 2024
· 5 comments
· Fixed by #7965 · May be fixed by realm/realm-dart#1770
Labels
Comments
➤ PM Bot commented: Jira ticket: RDART-1071 |
@derrickgw I can confirm this regression. Could you try using realm 3.1.0 as a work-around? |
➤ PM Bot commented: Jira ticket: RCORE-2221 |
This regression was introduced between realm-core v14.9.0 and v14.10.3. Timestamp are not required, the same issue can be provoked with ints. import 'package:realm_dart/realm.dart';
import 'package:realm_common/realm_common.dart';
part 'issue1749.realm.dart';
@RealmModel()
class $Child {
late int number;
}
@RealmModel()
class $Parent {
$Child? child;
}
void main() {
final realm = Realm(Configuration.inMemory([Parent.schema, Child.schema]));
realm.write(() {
realm.add(Parent(child: Child(1)));
});
realm.query<Child>(r"number BETWEEN {$0, $1}", [0, 2]).firstOrNull; // <-- this works
realm.query<Parent>(r"child.number BETWEEN {$0, $1}", [0, 2]).firstOrNull; // <-- this fails
Realm.shutdown();
} |
I haven't bisected it, but I suspect
to be the culprit |
This was referenced Aug 7, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What happened?
I got
Unhandled Exception: RealmException: Invalid column key. Error code: 3009.
when trying to use the between key for a DateTime field.Repro steps
Using a child property with the BETWEEN keyword doesn't work. Using < or > operators works with child properties without issue.
The exception is thrown regardless of whether the query should return anything.
Version
3.19
What Atlas Services are you using?
Local Database only
What type of application is this?
Flutter Application
Client OS and version
Android & Linux
Code snippets
This is sufficient code to expose the issue.
Stacktrace of the exception/crash you're getting
Relevant log output
No response
The text was updated successfully, but these errors were encountered: