Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix issue: Id is null when anon. type is de/-serialized #2433

Merged

Conversation

JKamsker
Copy link
Collaborator

Anonymous types get their _id zeroed out when deserializing.

@mbdavid mbdavid merged commit f856062 into litedb-org:master Feb 21, 2024
1 check passed
@mbdavid
Copy link
Collaborator

mbdavid commented Feb 21, 2024

Thanks @JKamsker

@JKamsker
Copy link
Collaborator Author

JKamsker commented Feb 21, 2024

Thanks for the Switft merge 🚀

Just one thing:
Was this even the correct approach?
Is this the way it's done in the other places?
I didnt find it, that's why i am asking.

I am:

  • Deserializing "Id"
  • If it is null, then check if _id is there and deserialize that

But it could also be:

  • If par.Name == Id then deserialize _id

Just not completely sure what the convention here is 😅

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants