Skip to content

Commit

Permalink
chore: remove no longer needed fallback for entity identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
B4nan committed Mar 26, 2021
1 parent b14cdcb commit fd0d91b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/core/src/unit-of-work/ChangeSetComputer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Configuration, Utils } from '../utils';
import { MetadataStorage } from '../metadata';
import { AnyEntity, EntityData, EntityProperty } from '../typings';
import { ChangeSet, ChangeSetType } from './ChangeSet';
import { Collection, EntityIdentifier, EntityValidator } from '../entity';
import { Collection, EntityValidator } from '../entity';
import { Platform } from '../platforms';
import { ReferenceType } from '../enums';
import { EntityComparator } from '../utils/EntityComparator';
Expand Down Expand Up @@ -75,7 +75,6 @@ export class ChangeSetComputer {
const isToOneOwner = prop.reference === ReferenceType.MANY_TO_ONE || (prop.reference === ReferenceType.ONE_TO_ONE && prop.owner);

if (isToOneOwner && !entity.__helper!.hasPrimaryKey()) {
entity.__helper!.__identifier = entity.__helper!.__identifier ?? new EntityIdentifier();
changeSet.payload[prop.name] = entity.__helper!.__identifier;
}
}
Expand Down

0 comments on commit fd0d91b

Please sign in to comment.