-
Notifications
You must be signed in to change notification settings - Fork 87
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
RDART-824 RDART-825 Add support for dynamic.getSet/getMap #1533
Conversation
28a8e16
to
7482829
Compare
if (setMetadata != null && _isTypeGenericObject<T>()) { | ||
switch (setMetadata.schema.baseType) { | ||
case ObjectType.realmObject: | ||
return object.realm.createSet<RealmObject>(handle, setMetadata); | ||
case ObjectType.embeddedObject: | ||
return object.realm.createSet<EmbeddedObject>(handle, setMetadata); | ||
case ObjectType.asymmetricObject: | ||
return object.realm.createSet<AsymmetricObject>(handle, setMetadata); | ||
default: | ||
throw RealmError('List of ${setMetadata.schema.baseType} is not supported yet'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This rubs me the wrong way, but I get the point..
throws<RealmException>( | ||
"Property 'strings' on class 'AllCollections' is 'RealmCollectionType.list' but the method used to access it expected 'RealmCollectionType.none'.")); | ||
"Property 'stringList' on class 'AllCollections' is 'RealmCollectionType.list' but the method used to access it expected 'RealmCollectionType.none'.")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope we can give a better error message at some point, instead of leaking the internal representation stuff.
Co-authored-by: Kasper Overgård Nielsen <[email protected]>
* Update to Core next-major * Update old-format file, update changelog * Add support for collections in RealmValue (#1469) * Initial stab at collections in mixed * regenerate ffi bindings * Add more tests * Add notification tests * Return the types * Address some PR feedback * Add RealmValueType * Fix some tests * Add query tests * Add tests for indexOf/contains; add tests for sets * Create a symlink for test data inside tests * Add a few more tests * Correct Core issue link * enable notifications tests * Enable some tests * Re-generate ffi * Fix test * Added a changelog entry * Update Core and reenable some tests * Update core submodule * Move cmake presets to root of repo * Move cmake presets back in realm_dart * Update Core * Fix paths * Regenerate ffi bindings * Remove deprecated members (#1526) * Update changelog * Update paths in prepare-release.yml * [Release 2.0.0-alpha.1] (#1527) * [Release 2.0.0-alpha.1] * fix paths * Read package version from the correct file * More release workflow fixes * .. * Remove some symlink removal * tar the correct packages --------- Co-authored-by: nirinchev <[email protected]> Co-authored-by: Nikola Irinchev <[email protected]> * Fixes to the release process * [Release 2.0.0-alpha.2] (#1528) * [Release 2.0.0-alpha.2] * Remove revived symlink --------- Co-authored-by: nirinchev <[email protected]> Co-authored-by: Nikola Irinchev <[email protected]> * Add support for dynamic.getSet/getMap (#1533) * Add support for dynamic.getSet/getMap * Fix test * More test fixes * Apply suggestions from code review Co-authored-by: Kasper Overgård Nielsen <[email protected]> * Regenerate models * Update changelog --------- Co-authored-by: Kasper Overgård Nielsen <[email protected]> --------- Co-authored-by: Realm CI <[email protected]> Co-authored-by: nirinchev <[email protected]> Co-authored-by: Kasper Overgård Nielsen <[email protected]>
Replaces #1305
Fixes #1324
Fixes #1323