I have a User class and a Company class in Java. When I use the user service in Angular to get the user details, it gets everything, but the Company is part of the user as a foreign key, but that keeps coming back undefined. Is there a way to do this?
Here is what I've been doing.
When I try user.company, it comes back as undefined.
This is my user service function.
I'm subscribing to it properly and it is getting the details, but just not the company.
Ron McLeod wrote:Is this really an Angular issue? If you use a tool like Postman or curl to query the backend, do you see the same behaviour?
I can't see the company information on Postman either, because on the back end Spring Data JPA, I have a @JsonBackReference annotation. Without that or @JsonIgnore, it throws an infinite loop and crashes the program. I don't know what else to do.