Skip to content

Commit

Permalink
fix(core): do not rehydrate values provided to constructor
Browse files Browse the repository at this point in the history
Closes #4790
  • Loading branch information
B4nan committed Oct 6, 2023
1 parent 48124a5 commit 8ff3f65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/entity/EntityFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class EntityFactory {
wrapped.__processing = true;
wrapped.__initialized = options.initialized;

if (meta.forceConstructor) {
if (options.newEntity || meta.forceConstructor || meta.virtual) {
const tmp = { ...data };
meta.constructorParams.forEach(prop => delete tmp[prop]);
this.hydrate(entity, meta2, tmp, options);
Expand Down

0 comments on commit 8ff3f65

Please sign in to comment.