Hi, someone use typeorm of Nodejs?
# orm-help
a
Hi, someone use typeorm of Nodejs?
h
yeah I have used it really like it for some of my typescript project that dont uses prisma
l
Yep, using it with NestJS
a
l
I think
zenbeni
is right on SO
You're providing an array of IDs but TypeOrm must be expecting an array of
User
objects instead
maybe you could try this way:
matrix.coworkers = [{ id: "1"}, { id: "2" }, {id: "3"}]
Mmm I think TypeScript will complain about the types
maybe:
matrix.coworkers = [{ id: "1"} as User, { id: "2" } as User, {id: "3"} as User]
(not very clean though)
a
@l0ck3 thanks! Can you implementation the entities that I'm using in some example in your computer and try to insert data? Like what I explain in the question?