-
Notifications
You must be signed in to change notification settings - Fork 167
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
Standalone objects support #221
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
3112d6c
Initial support for standalone objects
fealebenpae 8460deb
Standalone objects can be added to a realm
fealebenpae b11075b
Adding objects already owned by another realm should fail
fealebenpae 4c5d3cc
Fix RealmWeaver's PostBuild to be xplat again
fealebenpae 2b8707d
It shouldn't be possible to add an object to the same Realm more than…
fealebenpae 79262c2
Merge remote-tracking branch 'refs/remotes/origin/master' into yg-sta…
fealebenpae 5e1a598
Rename Add to Attach
fealebenpae df30bc2
Replace the conditional PostBuildEvents that copy the Weaver with a C…
fealebenpae 1b5db28
Implicitly attach standalone objects to a realm when adding to a rela…
fealebenpae 236f45e
Merge remote-tracking branch 'refs/remotes/origin/master' into yg-sta…
fealebenpae 01eb1e5
Merge remote-tracking branch 'refs/remotes/origin/master' into yg-sta…
fealebenpae ad78b2a
Fix test to run with the NUnitLite in our Integration Tests on IOS
AndyDentFree cb88595
Merge branch 'yg-standalone-objects' of https://github.com/realm/real…
AndyDentFree 01f44dd
Make Lists build and run for me
fealebenpae b823492
Merge branch 'yg-standalone-objects' of https://github.com/realm/real…
fealebenpae c411051
Remove all REALM_HAVE_CONFIG definitions
fealebenpae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
RealmNet.Shared/exceptions/RealmObjectAlreadyOwnedByRealmException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* Copyright 2015 Realm Inc - All Rights Reserved | ||
* Proprietary and Confidential | ||
*/ | ||
|
||
namespace RealmNet | ||
{ | ||
public class RealmObjectAlreadyOwnedByRealmException : RealmException | ||
{ | ||
public RealmObjectAlreadyOwnedByRealmException(string detailMessage) : base(detailMessage) | ||
{ | ||
|
||
} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
RealmNet.Shared/exceptions/RealmObjectOwnedByAnotherRealmException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* Copyright 2015 Realm Inc - All Rights Reserved | ||
* Proprietary and Confidential | ||
*/ | ||
|
||
namespace RealmNet | ||
{ | ||
public class RealmObjectOwnedByAnotherRealmException : RealmException | ||
{ | ||
public RealmObjectOwnedByAnotherRealmException(string detailMessage) : base(detailMessage) | ||
{ | ||
|
||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 think this is great for a first version. In the longer term, we want to have this copy be as fast as possible in case people are frequently creating objects standalone and assigning via Add. Something to think about is could we use Fody to generate an optimal copy method that wouldn't need to do all this reflection, creation of wovenProperties and iteration?
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.
Yes. In fact, @fealebenpae wanted to do this initally but we agreed that this solution is simpler and will do for the MVP.
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.
Great minds not only think alike but can arrive at same compromise (aka Engineering Decision ) :-D
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.
@kristiandupont and I had a conversation about this yesterday and I came up with the idea that we can weave a new method that does the copying so as to not incur the reflection costs. However we agreed on reflection for the time being until the performance considerations become important enough to necessitate more code weaving.