Skip to content
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

Port embedded object support to master #975

Merged
merged 14 commits into from
Oct 21, 2022
Merged

Conversation

nirinchev
Copy link
Member

@nirinchev nirinchev commented Oct 19, 2022

Alternative to #892

TODO:

  • Tests for [MapTo]
  • Tests for freezing
  • Tests for changes
  • Changelog
  • Relax the generic constraint of Realm.delete to allow RealmObjectBase

@coveralls
Copy link

coveralls commented Oct 19, 2022

Pull Request Test Coverage Report for Build 3297858857

  • 137 of 145 (94.48%) changed or added relevant lines in 9 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+4.1%) to 92.661%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/src/native/realm_core.dart 36 40 90.0%
lib/src/realm_object.dart 44 48 91.67%
Files with Coverage Reduction New Missed Lines %
lib/src/list.dart 1 88.5%
lib/src/subscription.dart 1 89.74%
Totals Coverage Status
Change from base Build 3296563275: 4.1%
Covered Lines: 404
Relevant Lines: 436

💛 - Coveralls

Copy link
Contributor

@blagoev blagoev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some suggestions for improvements. We could just discuss tomorrow instead of here, if you prefer.

common/lib/src/realm_common_base.dart Outdated Show resolved Hide resolved
generator/lib/src/class_element_ex.dart Outdated Show resolved Hide resolved
common/lib/src/realm_common_base.dart Outdated Show resolved Hide resolved
lib/src/realm_object.dart Show resolved Hide resolved
lib/src/native/realm_core.dart Outdated Show resolved Hide resolved
lib/src/native/realm_core.dart Show resolved Hide resolved
lib/src/native/realm_core.dart Outdated Show resolved Hide resolved
lib/src/native/realm_core.dart Show resolved Hide resolved
lib/src/native/realm_core.dart Outdated Show resolved Hide resolved
@nirinchev nirinchev marked this pull request as ready for review October 20, 2022 16:42
test/test.g.dart Show resolved Hide resolved
test/test.g.dart Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
generator/lib/src/class_element_ex.dart Show resolved Hide resolved
generator/lib/src/realm_model_info.dart Show resolved Hide resolved
test/embedded_test.dart Outdated Show resolved Hide resolved
test/embedded_test.dart Outdated Show resolved Hide resolved
Copy link
Contributor

@desistefanova desistefanova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have to consider anything about embedded object during the migration process?

@blagoev
Copy link
Contributor

blagoev commented Oct 21, 2022

change delete to realm.delete<T exnteds RealmObjectBase>

Copy link
Contributor

@blagoev blagoev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have discussed the needed changes to get this in

Copy link
Contributor

@desistefanova desistefanova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks great and works :)

@nirinchev nirinchev merged commit 0c459a0 into master Oct 21, 2022
@nirinchev nirinchev deleted the ni/embedded-objects-2 branch October 21, 2022 14:03
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants