Skip to content
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

fix: discriminator-based resolution #1118

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

kol-93
Copy link

@kol-93 kol-93 commented Feb 21, 2022

Description

Fixed:

  • type discriminator property deleted from source object after plainToInstance/instanceToPlain
  • cannot read property name of undefined/cannot read property constructor of null when trying to transform non-object (like null) to @Type() with discriminator
  • non-exposed type discriminator property when using instanceToPlain with @Exclude()

Added all functional tests for:

  • Classes with @Exclude()/@Expose()
  • Classes without @Exclude()/@Expose()

Checklist

  • the pull request title describes what this PR does (not a vague title like Update index.md)
  • the pull request targets the default branch of the repository (develop)
  • the code follows the established code style of the repository
    • npm run prettier:check passes
    • npm run lint:check passes
  • tests are added for the changes I made (if any source code was modified)
  • documentation added or updated
  • I have run the project locally and verified that there are no errors

Fixes

fixes #944
fixes #803
fixes #790
fixes #239

@ionutholbia
Copy link

Hi all,
I'm waiting for this fix, any ideas when it will be released?

@kol-93
Copy link
Author

kol-93 commented May 27, 2022

Hi all, I'm waiting for this fix, any ideas when it will be released?

Many people are waiting for this fix, but authors still don't care about.
So anyone who cares about this fix can use it as dependency like

npm i class-transformer@npm:@kol1993/class-transformer@^0.5.3-alpha.4

@thetilliwilli
Copy link

when?

@balkarov
Copy link

Hello. I need this fixes too. When will be released?

@Hum4n01d
Copy link

Bump! Having issues with this

@kwek20
Copy link

kwek20 commented May 30, 2023

Thanks for the PR kol-93
Also needing this. Tagging the last person to merge code in here: @saulotoledo

@jacksrm
Copy link

jacksrm commented Aug 2, 2023

When will this update be released?

@saulotoledo
Copy link
Member

@NoNameProvided I've not been active on the project for a while now. Could you take a look at this request or forward it to someone who could look into it?

@nedasoo
Copy link

nedasoo commented Feb 21, 2024

Bump, this is still an ongoing issue

@diffy0712 diffy0712 self-assigned this May 15, 2024
@Sun1ive
Copy link

Sun1ive commented May 17, 2024

@NoNameProvided this is very needed feature

@kol-93
Copy link
Author

kol-93 commented Jun 30, 2024

@diffy0712 Can somebody review this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment