const author = new Author('test', 'test') as WrappedEntity<Author>;
author.assign({ name: 111, email: 222 });
await orm.em.persistAndFlush(author);
author.assign(author, { name: '333', email: '444', born: 'asd' });
await orm.em.persistAndFlush(author);
author.assign({ name: '333', email: '444', born: '2018-01-01' });
await orm.em.persistAndFlush(author);
console.log(author.born).toBe(true);
author.assign({ born: new Date() });
await orm.em.persistAndFlush(author);
console.log(author.born).toBe(true);
author.assign({ born: null });
await orm.em.persistAndFlush(author);
console.log(author.born);
author.assign({ age: '21' });
await orm.em.persistAndFlush(author);
console.log(author.age);
author.assign({ age: 'asd' });
await orm.em.persistAndFlush(author);
author.assign({ age: new Date() });
await orm.em.persistAndFlush(author);
author.assign({ age: false });
await orm.em.persistAndFlush(author);