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

feat(model): add recompileSchema() function to models to allow applying schema changes after compiling #14306

Merged
merged 6 commits into from Feb 6, 2024

Conversation

vkarpov15
Copy link
Collaborator

Fix #14296

Summary

Making changes to schemas after compiling a model is a common feature request. We can support that by adding an extra model function recompileSchema() that applies schema changes after model compilation.

Examples

@vkarpov15 vkarpov15 added this to the 8.2 milestone Jan 29, 2024
Copy link
Collaborator

@AbdelrahmanHafez AbdelrahmanHafez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor suggestion, otherwise LGTM. Thanks! 👍

test/model.test.js Show resolved Hide resolved
Copy link
Collaborator

@hasezoey hasezoey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, though the jsdoc return type is wrong and addition to typescript types is missing

lib/model.js Outdated Show resolved Hide resolved
lib/model.js Outdated Show resolved Hide resolved
types/models.d.ts Show resolved Hide resolved
@vkarpov15 vkarpov15 changed the base branch from master to 8.2 February 6, 2024 21:15
@vkarpov15
Copy link
Collaborator Author

Merging into 8.2

@vkarpov15 vkarpov15 merged commit f696543 into 8.2 Feb 6, 2024
23 checks passed
@hasezoey hasezoey deleted the vkarpov15/gh-14296 branch February 7, 2024 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Virtual declared after model creation, doesn't work
3 participants