Note: TypeORM just released v0.3 which has some breaking changes on how you query relations, e.g. instead of an array of strings for find() you now use an object. Make sure to check the release notes and docs! Most of the fundamentals in the video still applies though.
@UCDpd-qEwAI9wglx4tsEBAtw how about changes creatConnection to dataSource? I have a project with install quick start and i can't see change about createConnection to dataSource? Can explain with this problem about quick start.
Bro, thank you for laying this out in such a clear and concise way. I've been struggling with typeOrm for a while now, and I finally decided to come and seek help. Silly devs like me who don't have the time to go through the documentation still try stabbing in the dark to figure it out which is far more time consuming. But I had no idea I could learn so much so quickly from anyone on the subect. Kudos!
Great tutorial, thanks to you i saved a lot of time, without this video i wouldn't be able to finish task that i was signed to. I can’t thank you enough.
Another excellent explanation video...many thanks for sharing your knowledge...you always go above and above and go extremely deep into educating us. I pray that God bless you and that your channel continues to develop at a rapid pace.
That's probably the first comment I'm leaving on a youtube video in years but I just wanted to say that you're amazing! Just finished your nestjs graphql video and I don't know what it is about your tutorials but I feel like they're hands down one of the best in the programming field. Thank you again! :) PS: Would love to see more NestJS GraphQL videos ^^
Thank you 🙏 definitely a full API project build with all the core concepts put together I think would make an awesome video but it will take some time, will consider it
@@mariusespejo Hey Marius, do you provide tutoring services by any chance? I'd love to learn directly from you! Please let me know if you'd consider it!
Hello Marius, Oh! I am very grateful for all the videos about TypeORM and NestJS, so helpfull. Thank you very much for sharing this knowledge in a didactic and clear way, you are the best! ❤
I feel like a girl in a fashion boutique on your channel, the only difference is that she don't have enough money to buy everything and I don't have enough time to watch, like and comment every video :D
First off, all of your NestJS and TypeORM are top-notch. Great pacing and flow. Many times you will expand the details in regards to a particular method or decorator (such as at 19:19 when explaining the @JoinTable options). How are you pulling that up?
Thanks Scott, I appreciate your feedback! Regarding your question, that is a feature in most editors/IDEs for typed languages, where you can do (on mac) CMD + Click to “drill into” the underlying type or definition.. on windows I think it’s CTRL + Click
HI Marius Espejo, Thanks for the Grate explanation 1. Can you give an example for Many to Many relationship like user and Friends. 2. Can you give an example of find with many to many relationship with where clause
Hi man, this is amazing. Could you share more deeper like how to define the relationship inside the entities service and resolvers rather than seeding the data into the database?
That’s exactly what I did in this video. I did show a method named seed but the point was to show how you’d do inserts in the service.. To make that more real you’d instead have some kind of create method which accepts a DTO to have the data as input and perform the same exact operations to insert and relate
@@mariusespejo Thanks for the response, really helpful, I'll try this later, really appreciate it...... great channel, has referred to all my friends...
@@mariusespejo , I kind of get what's your point, but the problem is how to implement with the input and the service, like what should I defined in the tasks.input to get the right employee id as the foreign key,and in the service do I need to inject all the related Repositories or just it's self's Repository? Maybe for you just a one minute set up but for a rookie like me can't find it anywhere ,so pls help to make a simple guide? Tks,really appreciate
There’s another typeorm fundamentals video in my channel that I would recommend watching, this is sort of part 2 to that covering relations specifically
isn’t that pretty much what this video was? What’s important to takeaway from this is how to do represent and query those relations. Which you can use in services, which you can then use in controllers to fully build out your API end to end
Thank you for the great tutorial Marius. I was playing with the code you wrote on the tutorial and I wonder if it's also possible to limit the number of tasks when you select employee by id? for example if the employee has too many tasks and don't need to show all of them but few of the latest ones. Is it possible to achieve this? or am I trying to do something impossible?
If I understand what you’re asking, of simply limiting the number of results, yes most relational DBs support adding a limit. For example you can query sorted by a date column (latest) and only limit to the first few results
TypeError: Cannot read properties of undefined (reading '_id') The meeting is getting saved but still this error is coming and further which the code is not working ( manager is not getting saved) I
Hi Marius, thanks for ur content. I have a question, if the user is in fact a manager, he needs to set manager field to null, right? We put manager field @ManytoOne(...{..., nullable:true}) ???
Yeah generally one way to represent a parent in a parent/child relationship is to set the the parent’s field as null. However in an employee database I would imagine everyone except the CEO would have a manager
Hey, I have started building an app for School, where there are two tables, teachers and students. There is a contactInfo table I want to use in both of them. So I placed a contactInfo id at teachers and students. How to have a one to one relation with contact info and teachers as well as students table? Also cascading should work
Thank you sir for the video. Please make a video of relations with TypeORM mongodb as many to many bi-directional relation is giving error - TypeError: Cannot read properties of undefined (reading '_id') The meeting is getting saved but still this error is coming and further which the code is not working ( manager is not getting saved)
Well explained @marius. Just have a question on the lazy load case. I prefer lazy load for the fact that I can choose what relations are required for me at the service layer, instead of defining all the relations with find at the Data Layer. Using lazy load I can fetch data at my service layer when and where required. Will like to have your thoughts on this use case.
Hi Marius, your videos have been super helpful. I have a scenario where a User has many assessments, and one assessment has many questions, each lye on seperate tables, how can i join so when i query a user, I see all his assessments and the questions for each of those assessment
Using the .find() api will let you do nested/sub relations, you can try something like: this.usersRepository.find( { relations: [ ‘assessments’, ‘assessments.questions’ ] } );
Or just use the query builder which should let you do basically anything you can normally do with sql, meaning using multiple joins to achieve the same result, that should be also covered in this video I believe
Hi, thanks for the video! I have a question about skip and take for the “children” of the relations, so basically pagination. Is it possible to set limit and offset for (for example) the tasks of an employee during the DB query or I should do it programmatically after I get everything from the DB?
You have to think about it from a SQL perspective, if you can write a sql query with limit and offset then you likely can also do it from typeorm. Although probably not with pulling relations with the find() API you’ll likely want to do your example using the query builder, do a join, and set the limit and offset there
Very helpful, thank you :-) I saw different code samples about CRUD operations with TypeORM. Some uses Repositories, some not. Such as; const userRepo = getConnection("defalt").getRepository(User); const user = await userRepo .create({ email, firstName, lastName, password: hashedPassword, }) .save(); and without repository; const user = await User.create({ email, firstName, lastName, password: hashedPassword, }).save(); they do the same job. When or why to use repository? Thanks
I would suggest reading about Active Record vs Data Mapper patterns, there are pros and cons to both and it’s ultimately up to your preference. In nestjs specifically it will work best with the repositories
you can implement a form of pagination and/or perhaps use a separate direct api call for it like /employees?manager=managerId&limit=10 typeorm has support for querying with limit/take and offset
@mariusespejo I love this video, I saw it every time I need help. But this time I have a question: I have two entities whit manyToMany relationship and I did a queryBuilder to filter the info by an input. The thing is that I have a leftJoinAndSelect and then in a where clause I have a sentence whit LIKE operator. How can I do to filter a property to the entity that is given whit the relationship? (I don't know if it's understanding)
If I understand, you’re trying to filter based on a value on the related table? e.g. let’s say you have entities Photo and User with a many to many relationship. You want to find all the users tagged on a photo, where there name starts with “Mar” for example. Then you might have a query like this, using query builder. Basically make sure you’re utilizing the alias that you create with your join this.photosRepository.createQueryBuilder(“photo”).leftJoinAndSelect(“photo.users”, “user”).where(“user.name LIKE :name”, { name: “Mar%” }).getMany();
Hey, I'm trying to dive into NestJS with TypeORM, but coming from Laravel, I'm having a hard time using data mappers instead of active record pattern... Would you make a tutorial for NestJS with TypeORM using activeRecord pattern (or even Sequelize ?) Thanks anyway !
The typeorm integration with nest specifically uses the data mapper with repositories. That’s because entities aren’t “injectable” they’re just representing the data. It’s not really that big of a shift, you simply instead either use services or custom repositories for your query methods
Is it possible to use NestJS without type orm with mysql? What if I want to write plain sql statements instead of type orm? you can do a video using only sql statements?
I’m sure you can but it’s not very practical to use the mysql driver directly like that. Typeorm can also do raw queries if you really wanted to. Or you can use knexjs
i always get this : [Nest] 6684 - 11/16/2021, 11:51:29 ERROR [ExceptionHandler] Nest can't resolve dependencies of the AppService (?, ContactInfoRepository, MeetingRepository, TaskRepository). Please make sure that the argument EmployeeRepository at index [0] is available in the AppModule context. please help me : (
@@mariusespejo Thank You, so much, Needed to Implement Complex Filter for Products, Query Builder worked Perfectly Resolved my issues even for nested ones. God Bless You.
can you please help, one to one cascade delete doesn't work typeorm? because I tried all the methods, after searching on the Internet I saw that many people encountered this problem
Cascade deletion is database responsibility not your ORM’s. Make sure you actually have the foreign key in place with Cascade delete setting on your column schema. Then you delete from the referencing side.
hi, is it possible to create a single view for join query instead of multiple data subsets. Say I need a customer name from customer table with every order, my order data should be look like this: { order: 1 orderdate: 2023-04-20 customername: abc } not like showing customer[] as a separate object. Please advise.
Note: TypeORM just released v0.3 which has some breaking changes on how you query relations, e.g. instead of an array of strings for find() you now use an object. Make sure to check the release notes and docs! Most of the fundamentals in the video still applies though.
Can you explain about V0.3 and what is changes in typeorm?
Thank you
@UCDpd-qEwAI9wglx4tsEBAtw how about changes creatConnection to dataSource?
I have a project with install quick start and i can't see change about createConnection to dataSource?
Can explain with this problem about quick start.
I suggest reading their release notes in github, it’s a lot to explain in a comment
@@mariusespejo Okay. Thank you for advice. I'm go to github.
You're really good to explain. Thank you for that.🙏
You've exposed TypeORM with great eloquence and simplicity.
Your channel is the best source of information on NestJs and TypeOrm , Keep up the good work👍
another great tutorial, learning Typorm never been so easy before!
Thanks you so much Marius
Bro, thank you for laying this out in such a clear and concise way. I've been struggling with typeOrm for a while now, and I finally decided to come and seek help. Silly devs like me who don't have the time to go through the documentation still try stabbing in the dark to figure it out which is far more time consuming. But I had no idea I could learn so much so quickly from anyone on the subect. Kudos!
Thanks for the comment! Glad this old video is still helping folks out!
@@mariusespejo In a big way!
THANK YOU! ❤❤ this is what i needed all these times, a basic in depth tutorial on why and how to use the relationships in typeorm
It’s an old video but glad it’s still helpful!
Great tutorial, thanks to you i saved a lot of time, without this video i wouldn't be able to finish task that i was signed to. I can’t thank you enough.
Another excellent explanation video...many thanks for sharing your knowledge...you always go above and above and go extremely deep into educating us. I pray that God bless you and that your channel continues to develop at a rapid pace.
thank you ..man..it is one of the most beautiful tutorials I ever watched.
Just when I was about to give up on nestjs. You showed up. Thanks alot
glad to have been able help!
That's probably the first comment I'm leaving on a youtube video in years but I just wanted to say that you're amazing! Just finished your nestjs graphql video and I don't know what it is about your tutorials but I feel like they're hands down one of the best in the programming field. Thank you again! :)
PS: Would love to see more NestJS GraphQL videos ^^
Thanks Ivelin! I appreciate that! 🙏
Definitely more graphql content in the future!
Thanks so much for your videos on nest js. I got a new job that requires that i work with Nest Js and your videos have been helpful
Glad to hear that man, congratulations on the new job!
You deserve millions of subscribers man🙂
haha thank you, hope you’re one of them!
Awesome tutorials which covers all the fundamentals to get involve in the typeORM project
You just can't imagine how helpfull this was. Liked and subscribed!
thanks!! 🙏
at this point we need a fully nest api even if the video is 4 hours long the way you teach and explain stuff is just amazing i can't get bored ✌🏻❤️
Thank you 🙏 definitely a full API project build with all the core concepts put together I think would make an awesome video but it will take some time, will consider it
@@mariusespejo no problem take all your time and am sure you'll make amazing content
@@mariusespejo Hey Marius, do you provide tutoring services by any chance? I'd love to learn directly from you! Please let me know if you'd consider it!
Not at the moment, although I’ll definitely consider it and look into it. What sorts of things would you want to learn from me directly?
Yours video on left and nest docs on right make my night, Wow
best ever tutorial, so easy to understand
Thank you!
dude, you are legit. thank you so much
thanks for creating such good tutorial
great content.. even useful after 2 years. thanks a lot.
Good tutorial. thanks
You always help me with your videos. Thank you man, keep up great content as always ❤️
Thanks man. That's a great tutorial
Hello Marius, Oh! I am very grateful for all the videos about TypeORM and NestJS, so helpfull. Thank you very much for sharing this knowledge in a didactic and clear way, you are the best! ❤
Hi Ceci! I’m glad you’re finding the channel useful, thanks for your feedback 🙏
It was a greate introduction to TypeORM relations.
Thanks a lot 👍👍
Well explained. Thankyou Very much.
Thanks a lot @Marius. Youe tutorials are making my NestJS journey so easy.
Keep up the good work sir :)
Happy to hear that, thanks for the comment!
well-structured and well-designed tutorials.
Thank you for the feedback 🙏
Hi Marius,
I just found your channel with this video. I really appreciate the way you explain the things in simple.
Thanks a lot 👍
Glad you’re finding the content useful!
I feel like a girl in a fashion boutique on your channel, the only difference is that she don't have enough money to buy everything and I don't have enough time to watch, like and comment every video :D
haha time is money!
Awesome, every single detail is well explained.
glad it’s not confusing, thanks for your feedback 😄
Thanks for this video. Really well paced, everything is well explained, incredibly helpful. Subscribed and looking forward to more videos :)
Thanks Art!
awesome explanation thank you
You are awesome, man!!!!
Thank you for this TypeOrm Tutorial
AMAZING tutorial. You've definitely earned a sub, and I'll be checking out your other tutorials
Thank you!
Very well put together. Thank you!
Extremely useful. Thank you Marius.
This is what i finally need it 🙌 thanks 😊
🙌🙌😁
Amazing explanation on the stuff,Nicely done!!
Thanks man!
So helpful, i really enjoy your videos, greetings from Peru, keep it up!
awesome to know I'm reaching Peru! thank you!
thanks a lot this was the best explanation ever
absolutely beautiful vid
you are doing great ,thanks
Oh man.. thanks for this tutorial
Greta tutorial! Also, what is the markdown editor you're using throughout the video? It looks great
That’s the bear app, if you want something clean and simple it’s great. But nowadays I’d probably use Obsidian
Excellent video thank you!
Thanks a lot - useful tuttorial for people who modef from another language into nodejs (nestJs)
Very appreciate for this amazing video. Keep going!
Thank you Han 🙏
Thank you man i find this soo helpful keep the good work
Amazing content!! It really helps a lot ! Keep it up
Thanks man!
Thank you sir! This helped.
Yeah man! Glad to help
Excellent! Thanks
Appreciate this man! Keep it up! ❤
Thanks Kurt!
Great content Marius👍, as always :)
thank you! 🙏
Great one. Keep it up
You really help me thank you so much
You’re welcome!
God bless you Marius
First off, all of your NestJS and TypeORM are top-notch. Great pacing and flow. Many times you will expand the details in regards to a particular method or decorator (such as at 19:19 when explaining the @JoinTable options). How are you pulling that up?
Thanks Scott, I appreciate your feedback! Regarding your question, that is a feature in most editors/IDEs for typed languages, where you can do (on mac) CMD + Click to “drill into” the underlying type or definition.. on windows I think it’s CTRL + Click
thanks for this video..this help me a alot...you are awesome.
glad it’s helping!
HI Marius Espejo,
Thanks for the Grate explanation
1. Can you give an example for Many to Many relationship like user and Friends.
2. Can you give an example of find with many to many relationship with where clause
Did you watch the entire video? I thought I did cover Many to Many
Thank you so much
You’re welcome!
very usefull, thanks for videos!
Hi man, this is amazing. Could you share more deeper like how to define the relationship inside the entities service and resolvers rather than seeding the data into the database?
That’s exactly what I did in this video. I did show a method named seed but the point was to show how you’d do inserts in the service.. To make that more real you’d instead have some kind of create method which accepts a DTO to have the data as input and perform the same exact operations to insert and relate
@@mariusespejo Thanks for the response, really helpful, I'll try this later, really appreciate it...... great channel, has referred to all my friends...
@@mariusespejo hi man,any way to reach out to you? Discord or email?
@@mariusespejo , I kind of get what's your point, but the problem is how to implement with the input and the service, like what should I defined in the tasks.input to get the right employee id as the foreign key,and in the service do I need to inject all the related Repositories or just it's self's Repository? Maybe for you just a one minute set up but for a rookie like me can't find it anywhere ,so pls help to make a simple guide? Tks,really appreciate
Have you seen the typeorm fundamentals vid in my channel? Might help
Thank so much
remind me of symfony and doctrine ❤❤❤❤
Thanks man! Sadly NestJS doesn't have a strong community as Expressjs.
well it uses Express under the hood by default so you could argue that it’s utilizing that same community and ecosystem 😄
It was a very helpful tutorial. Thank you. Can you please explain how we can use update query for relational table.
There’s another typeorm fundamentals video in my channel that I would recommend watching, this is sort of part 2 to that covering relations specifically
Thanks again.
you’re welcome!
i hope you upload video for tutorial ORM ManyToMany, OneToMany, ManyToOne... with Api and CRUD this problem. Thank so much !!!
isn’t that pretty much what this video was? What’s important to takeaway from this is how to do represent and query those relations. Which you can use in services, which you can then use in controllers to fully build out your API end to end
thank you!
No problem!
41:27 shows a raw query in the terminal, are you using a special extension for that?
notice at 2:43 that you can configure logging in the connection options
@@mariusespejo this is AWESOME thank you!!
no problem!
Thank you for the great tutorial Marius. I was playing with the code you wrote on the tutorial and I wonder if it's also possible to limit the number of tasks when you select employee by id? for example if the employee has too many tasks and don't need to show all of them but few of the latest ones. Is it possible to achieve this? or am I trying to do something impossible?
If I understand what you’re asking, of simply limiting the number of results, yes most relational DBs support adding a limit. For example you can query sorted by a date column (latest) and only limit to the first few results
Thank you
you're welcome!
Good tutorial and great thanks !Can you please make a tutorial for html to pdf using templating ejs in Nestjs ?
TypeError: Cannot read properties of undefined (reading '_id')
The meeting is getting saved but still this error is coming and further which the code is not working ( manager is not getting saved)
I
Hi Marius, thanks for ur content. I have a question, if the user is in fact a manager, he needs to set manager field to null, right? We put manager field @ManytoOne(...{..., nullable:true}) ???
Yeah generally one way to represent a parent in a parent/child relationship is to set the the parent’s field as null. However in an employee database I would imagine everyone except the CEO would have a manager
Hey, I have started building an app for School, where there are two tables, teachers and students.
There is a contactInfo table I want to use in both of them. So I placed a contactInfo id at teachers and students.
How to have a one to one relation with contact info and teachers as well as students table? Also cascading should work
I covered one-to-one, did you watch the whole thing? Or was it not clear?
which is auto snippet code you are using? Thank
why is there no employeeId on task? it was on ER diagram
Nice
Thank you sir for the video.
Please make a video of relations with TypeORM mongodb as many to many bi-directional relation is giving error - TypeError: Cannot read properties of undefined (reading '_id')
The meeting is getting saved but still this error is coming and further which the code is not working ( manager is not getting saved)
I suggest asking about errors in stackoverflow
@@mariusespejo Ok sir
Thank you
Well explained @marius. Just have a question on the lazy load case. I prefer lazy load for the fact that I can choose what relations are required for me at the service layer, instead of defining all the relations with find at the Data Layer. Using lazy load I can fetch data at my service layer when and where required. Will like to have your thoughts on this use case.
Yup, I don’t think either way is better, it’s really all preference
@@mariusespejo Agree Thanks for replying back.
Hi Marius, your videos have been super helpful. I have a scenario where a User has many assessments, and one assessment has many questions, each lye on seperate tables, how can i join so when i query a user, I see all his assessments and the questions for each of those assessment
Using the .find() api will let you do nested/sub relations, you can try something like: this.usersRepository.find( { relations: [ ‘assessments’, ‘assessments.questions’ ] } );
Or just use the query builder which should let you do basically anything you can normally do with sql, meaning using multiple joins to achieve the same result, that should be also covered in this video I believe
can we have 2 or 4 relationship? how to recreated it? thx
Hi, thanks for the video! I have a question about skip and take for the “children” of the relations, so basically pagination. Is it possible to set limit and offset for (for example) the tasks of an employee during the DB query or I should do it programmatically after I get everything from the DB?
You have to think about it from a SQL perspective, if you can write a sql query with limit and offset then you likely can also do it from typeorm. Although probably not with pulling relations with the find() API you’ll likely want to do your example using the query builder, do a join, and set the limit and offset there
Very helpful, thank you :-)
I saw different code samples about CRUD operations with TypeORM. Some uses Repositories, some not. Such as;
const userRepo = getConnection("defalt").getRepository(User);
const user = await userRepo
.create({
email,
firstName,
lastName,
password: hashedPassword,
})
.save();
and without repository;
const user = await User.create({
email,
firstName,
lastName,
password: hashedPassword,
}).save();
they do the same job. When or why to use repository?
Thanks
I would suggest reading about Active Record vs Data Mapper patterns, there are pros and cons to both and it’s ultimately up to your preference. In nestjs specifically it will work best with the repositories
Size limitation for directReports? what is the best way to query that property when a manager has 100+ employees?
you can implement a form of pagination
and/or perhaps use a separate direct api call for it like
/employees?manager=managerId&limit=10
typeorm has support for querying with limit/take and offset
@mariusespejo I love this video, I saw it every time I need help. But this time I have a question: I have two entities whit manyToMany relationship and I did a queryBuilder to filter the info by an input. The thing is that I have a leftJoinAndSelect and then in a where clause I have a sentence whit LIKE operator. How can I do to filter a property to the entity that is given whit the relationship? (I don't know if it's understanding)
If I understand, you’re trying to filter based on a value on the related table? e.g. let’s say you have entities Photo and User with a many to many relationship. You want to find all the users tagged on a photo, where there name starts with “Mar” for example. Then you might have a query like this, using query builder. Basically make sure you’re utilizing the alias that you create with your join
this.photosRepository.createQueryBuilder(“photo”).leftJoinAndSelect(“photo.users”, “user”).where(“user.name LIKE :name”, { name: “Mar%” }).getMany();
Am I the only one wondering which app he used for that to-do list?
That was the Bear app I think, it’s actually for markdown notes, not necessarily a todo app
Was looking for TypeORM stuff and come across your channel. It's quite good actually . Hit subscribe btn
Hey, I'm trying to dive into NestJS with TypeORM, but coming from Laravel, I'm having a hard time using data mappers instead of active record pattern...
Would you make a tutorial for NestJS with TypeORM using activeRecord pattern (or even Sequelize ?)
Thanks anyway !
The typeorm integration with nest specifically uses the data mapper with repositories. That’s because entities aren’t “injectable” they’re just representing the data. It’s not really that big of a shift, you simply instead either use services or custom repositories for your query methods
Is it possible to use NestJS without type orm with mysql? What if I want to write plain sql statements instead of type orm? you can do a video using only sql statements?
I’m sure you can but it’s not very practical to use the mysql driver directly like that. Typeorm can also do raw queries if you really wanted to. Or you can use knexjs
i always get this :
[Nest] 6684 - 11/16/2021, 11:51:29 ERROR [ExceptionHandler] Nest can't resolve dependencies of the AppService (?, ContactInfoRepository, MeetingRepository, TaskRepository). Please make sure that the argument EmployeeRepository at index [0] is available in the AppModule context.
please help me : (
If it can’t inject the repository that means you like didn’t do TypeormModule.forFeature for that employee entity
how to filter with relations with array likes tasks name ?, great content
Generally for more complex queries you’re better off using the query builder and do an actual join, then add in your where clauses to filter
@@mariusespejo Thank You, so much, Needed to Implement Complex Filter for Products, Query Builder worked Perfectly Resolved my issues even for nested ones. God Bless You.
Awesome glad you figured it out!
thanks marius
can you please help, one to one cascade delete doesn't work typeorm? because I tried all the methods, after searching on the Internet I saw that many people encountered this problem
Cascade deletion is database responsibility not your ORM’s. Make sure you actually have the foreign key in place with Cascade delete setting on your column schema. Then you delete from the referencing side.
thnks
hi, is it possible to create a single view for join query instead of multiple data subsets. Say I need a customer name from customer table with every order, my order data should be look like this:
{
order: 1
orderdate: 2023-04-20
customername: abc
}
not like showing
customer[] as a separate object.
Please advise.
Are you asking if typeorm supports views? Yes you can create view entities and query them like normal tables
typeorm.io/view-entities
@@mariusespejo Yes bro, I exactly needed the same option, thanks a lot and take care.