-
Notifications
You must be signed in to change notification settings - Fork 165
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
List of EmbeddedObject no longer being returned with parent object. #3657
Comments
➤ PM Bot commented: Jira ticket: RNET-1171 |
I think the issue here might be the default value for the list - can you try and remove it and see if that works? |
Hi,
I removed the list assignment for Entries in the Journal model definition. It made no difference.
Regards,
Ian
…On 31 Jul 2024 at 7:16 PM +0900, Nikola Irinchev ***@***.***>, wrote:
I think the issue here might be the default value for the list - can you try and remove it and see if that works?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I've tried to reproduce that and have not been successful. Here's my minimal attempt based on the models that you posted and that behaves as expected (re-running the application preserves the objects I've added). Can you try running it and if that works fine for you - try and modify it so that it triggers the behavior you're observing. |
Hi,
My apologies.
I did not fully remove the setting of Entries. Doing so does fix the issue.
Many thanks for your prompt help.
You can close the ticket.
Regards,
Ian
…On 1 Aug 2024 at 12:42 AM +0900, Nikola Irinchev ***@***.***>, wrote:
I've tried to reproduce that and have not been successful. Here's my minimal attempt based on the models that you posted and that behaves as expected (re-running the application preserves the objects I've added). Can you try running it and if that works fine for you - try and modify it so that it triggers the behavior you're observing.
Issue3657.zip
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
What happened?
I have Journal and JournalEntry classes per the definitions below. During startup, some sample data is created including 3 Journal objects each with either two or three JournalEntry objects attached. Subsequently, I use the following query to retrieve the list of Journals.
var journalList = new ObservableCollection<Journal>(_realm.All<Journal>().OrderBy(x => x.Date).ToList());
All three of the Journal objects retrieved have an empty Entries list (i.e. list count is zero).
I'm not sure which package upgrade caused this to stop working.
Repro steps
Interestingly though, if I migrate all objects to partial classes and use interfaces (i.e IRealmObject) it starts working again. However, this appears to bring heaps of pain with compiler nullability warnings left, right, and centre that I cannot seem to resolve.
Version
Realm 12.3.
What Atlas Services are you using?
Local Database only
What type of application is this?
Other
Client OS and version
macOS 14.5; NET MAUI 8; C# 12
Code snippets
Stacktrace of the exception/crash you're getting
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: