I'm currently learning TypeScript with Node. Reading about TypeORM, I saw that the reflect-metadata
package is needed for TypeORM to work. What is the reason for this package being needed?
Why does TypeORM need reflect-metadata?
Asked Answered
Why do you think it isn't? Please offer some reasoning as to why you think it wouldn't be so that we can help you understand the utility of the package. –
Reta
Well, you say to the orm what are the entities he must map. So i don't understand why the orm needs additional data (i came from jpa because that i don't understant it) –
Ute
With the reflect-metadata package you can do runtime reflection on types. Since TypeORM mostly works with decorators (like @Entity or @Column), this package is used to parse these decorators and use it for building sql queries.
The following link provides detailed information about what this package is capable of: http://blog.wolksoftware.com/decorators-metadata-reflection-in-typescript-from-novice-to-expert-part-4.
© 2022 - 2024 — McMap. All rights reserved.