-
Notifications
You must be signed in to change notification settings - Fork 512
feat: allow defining different groups for toPlain and toClass operations #378
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
Comments
This comment has been minimized.
This comment has been minimized.
We have come across a use case where this would be extremely helpful. In our situation, we needed to set the "name" attribute differently based on whether we were going classToPlain or plainToClass. |
Any news? We also came across some use cases for this. Not only multiple |
Any updates on this? Would be super helpful for reusing classes efficiently with both functions. Another example, fetching from a database and having the document model transformed with all specified properties exposed, but when serializing for a user it makes use of the groups. I guess you could just have a single group you apply to everything when fetching from the database, but it would be nice to have this option as well. |
Fixes the issue typestack#378.
Any updates? |
Description
Users should be able to allow defining different groups for plainToClass and classToPlain. Example:
We need to discuss what is the motivation behind this and can we achieve this with the current toolset or not.
The text was updated successfully, but these errors were encountered: