-
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
[Bug]: Frozen object has incorrect property indices #2670
Comments
I couldn't attach the zip so here's a link to the project that has it. https://github.com/JamieColclough/Frozen-object-has-incorrect-property-indices/tree/main/RealmSyncFreezeError I couldn't upload the packages but hopefully you can build the project with this |
@JamieColclough thanks a lot for your project! We managed to reproduce the issue and we're currently investigating it. |
@papafe Thanks! in the meantime, is there a workaround I can do so I can still use the frozen realm? |
@JamieColclough we found the cause of the issue and we are working on a fix. [MapTo("clinic_appointment")]
public class ClinicAppointment : RealmObject
{
[PrimaryKey]
[MapTo("_id")]
public int AppointmentId { get; set; }
[MapTo("_partition")]
[Required]
public string Partition { get; set; } //This is what you are missing right now
[MapTo("appointment_time")]
public DateTimeOffset AppointmentTime { get; set; }
[MapTo("clinic_schedule_id")]
public ClinicSchedule ClinicSchedule { get; set; }
[MapTo("clinician_id")]
public Clinician Clinician { get; set; }
[MapTo("is_uploading")]
public bool IsUploading { get; set; }
[MapTo("patient_record")]
public PatientRecord PatientRecord { get; set; }
[MapTo("patient_seen")]
public bool PatientSeen { get; set; }
[MapTo("status_id")]
public int StatusId { get; set; }
} I don't know how exactly you are using frozen objects, as I suppose the project that you shared is probably a very simplified version of your use case, but I could also suggest not freezing the realm for now and just use the live objects. |
This was fixed in 10.7.1. |
Reported on the forums: https://www.mongodb.com/community/forums/t/realm-sync-net-freezing-an-object-on-a-synced-realm-messes-the-properties-up/126797
Looks like we're somehow using an incorrect object schema when looking up the properties, but it's not obvious what's causing it.
The text was updated successfully, but these errors were encountered: