Permalink
Browse files

fix(UnitOfWork): Use entity reference when proxy

  • Loading branch information...
RWOverdijk committed Oct 7, 2016
1 parent 26e3ce9 commit 3c9b57bb4e2adcca82d51b7f516c84195da2be49
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/UnitOfWork.ts
@@ -309,7 +309,7 @@ export class UnitOfWork {
*/
public setEntityState(entity: ProxyInterface, state: string): UnitOfWork {
let metaData = MetaData.forInstance(entity);
let target = entity.isEntityProxy ? entity.getTarget : entity;
let target = entity.isEntityProxy ? entity.getTarget() : entity;
let previousState = metaData.fetch('entityState.state', UnitOfWork.STATE_UNKNOWN);
if (previousState === state) {

0 comments on commit 3c9b57b

Please sign in to comment.