In my system, I have established a relationship between User and Groups entities. A group can have multiple users, and a user can belong to more than one group. This relationship is defined in the UserEntity and GroupsEntity classes. However, there seems to be an issue when making requests using Postman. While the User record gets created successfully, the IDs that link groups and users are not generated in the corresponding table (which represents the relationship between the two entities).
Here are the key code snippets:
UserEntitity.ts
/* UserEntity class definition */
GroupsEntity.ts
/* GroupsEntity class definition */
user.service.ts - create method
/* Implementation of the create method in UserService */
The database structure is outlined here: Bank entity relationships diagram
Although no errors are reported in the code, the relationship IDs are not being created as expected. My application is built with microservices in nestJS, uses TypeScript, and is backed by a MySQL database.