-
-
Notifications
You must be signed in to change notification settings - Fork 261
Closed
Labels
Description
Issue when upgrading to Parse SDK 4.0
After upgrading to Parse SDK 4.0, I've run into a few issues due to changes in the API. Here’s what I’ve encountered:
-
user.Username
is no longer accessible- In previous versions, I was able to access the
Username
field directly withuser.Username
, but in version 4.0, that field seems to be missing. The following code no longer works:var user = ParseClient.Instance.GetCurrentUser(); if (user.Username == "Test123") { // logic }
- In previous versions, I was able to access the
-
user.GetRelation<ParseObject>("SomeClass")
is no longer available- The method
GetRelation<ParseObject>("SomeClass")
no longer works. I'm unsure how to handle relations in version 4.0 since it seems like this method was changed or removed. Here’s the code that no longer functions:var someClassRelation = user.GetRelation<ParseObject>("SomeClass");
- The method
-
await user.SaveAsync()
is no longer working- The method
SaveAsync()
is no longer available onParseUser
objects directly. The following code no longer works:await user.SaveAsync();
- The method
Environment
- Parse SDK Version: 4.0
- Platform: .NET 9.0 MAUI, iOS/Android (or specify your platform)
Any guidance or clarification on these issues would be greatly appreciated! Thanks in advance. Maybe @YBTopaz8 can help? Thanks!
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
parse-github-assistant commentedon Dec 19, 2024
Thanks for opening this issue!
YBTopaz8 commentedon Dec 19, 2024
Hi @patkozlowski
Thank for pointing those out.
Might've missed missed/changed them.
Also, the documentations aren't updated yet, but will be in a few.
Expect a fix today.
mtrezza commentedon Dec 20, 2024
@YBTopaz8 could you please also add the tests for these fixes? It seems these issues were not caught by the CI because of the low test coverage. Thanks to @patkozlowski for reporting, that helps us to improve the coverage.
[-]Issue when upgrading to Parse SDK 4.0[/-][+]Missing methods in Parse .NET SDK 4.0[/+]YBTopaz8 commentedon Dec 20, 2024
Absolutely.
I've fixed all issues pointed out (in fact, 2 of 3 were fixed by a PR I was about to do today.)
I fixed the 3 one (an oversight led to an overflow.)
YBTopaz8 commentedon Dec 20, 2024
Just updating to info that I have fixed tests too so they work.

PR incoming
YBTopaz8 commentedon Dec 21, 2024
Just submitted #402 that clears your issues and any other potential one.
Added actually over 100 tests that should significantly improve coverage.
Starting to get a hang of it.
Good stuff 👍🏾.
@patkozlowski truly appreciate your feedback

Bug Fix & Enhancements
patkozlowski commentedon Dec 25, 2024
Thanks for the quick turn around @YBTopaz8, great work!
YBTopaz8 commentedon Dec 26, 2024
Thanks @patkozlowski
When it will be released, you will be able to use Relations and Pointers as intended.
This file has a full implementation of the core Parse Functionalities (login, save file, CRUD parse objects and Relations, call cloud code function, and much more!)
Plus, It shows how Parse Live Queries are implemented in .NET by myself as well, using RX.NET so when it will be available in official parse for .NET, we will all enjoy it.
I'll be using that repo as the Sample Repo when redoing the documentation anyway. Hopefully before New Year but time will tell.
Best.
YBTopaz8 commentedon Jan 9, 2025
Quickly Pinging to say please expect some updates this week (Got caught up here and there)
I aim to bring some more improvements I've been working on personally
Sorry for the delay!
YBTopaz8 commentedon Feb 2, 2025
Working on closing this issue (See #407 ) and any other today.
Hopefully all moves well.
YBTopaz8 commentedon Feb 2, 2025
Hi @patkozlowski
Now that #407 is closed, All your mentioned issued should be resolved.
Some insights to anyone curious;
Parse for .NET is heavily reliant on Encoding and Decoding and the right type of encoded/decoded data matters a lot.
As we know, some Parse datatypes are primitive (string, int, bool) and others are
complex
like Relations that use Dictionaries.Little known fact is that Parse Operations (Set,add,addunique,delete etc..) are all fundamentally dictionary data you're sending to the Parse Server that will in its turn decode.
So in the previous release, as I attempted to make it so that only one method can handle both primitives and complex data types, I
simply had to change the return type of
ConvertToJSON()
from a specificDictionary<string,object>
to a genericobject
, that way,this method
GenerateJSONObjectForSaving()
found inObjectServiceExtensions.cs
file will now always have the right "value" encoded when I doHere by Fixing ALL issues linked to Parse Objects not saving properly (thus, breaking relations in that process)
I'm looking forward to polish more stuff in the coming days - but do let me know if there's anything missing or suggestions 🙂
mtrezza commentedon Feb 2, 2025
Great, can this issue be closed?
YBTopaz8 commentedon Feb 2, 2025
Yes, @mtrezza please do.
ParseObject
Relations not working #407mtrezza commentedon Feb 2, 2025
Closing via #407