Closed 4lessandrodev closed 1 year ago
Describe the bug toObject method on entity is not processing simple objects
To Reproduce
interface Profile { name: string; age: number; } interface Props { id?: UID; profile: Profile; } class Example extends Entity<Props>{} const example = Example.create({ profile: { name: "Jane", age:21 } }).value(); console.log(example.toObject()): > { id: "4666ce4b-10d9-4999-9da8-0caef5b7fd50", createdAt: "2023-01-05T18:34:54.198Z", updatedAt: "2023-01-05T18:34:54.198Z" };
Expected behavior the toObject method should process simple object and apply it to generated props
console.log(example.toObject()): > { id: "4666ce4b-10d9-4999-9da8-0caef5b7fd50", createdAt: "2023-01-05T18:34:54.198Z", updatedAt: "2023-01-05T18:34:54.198Z", profile: { name: "Jane", age: 21 } };
Lib Version rich-domain v1.15.1
Describe the bug toObject method on entity is not processing simple objects
To Reproduce
Expected behavior the toObject method should process simple object and apply it to generated props
Lib Version rich-domain v1.15.1
25