-   Notifications  You must be signed in to change notification settings 
- Fork 377
Closed
Labels
status: waiting-for-triageAn issue we've not yet triagedAn issue we've not yet triaged
Description
In normal case we have one to one parent child relationships.
 Like one parent class User and it has a child UserType.
@Data public class User { @Id private Long id; private String name; private UserType type; } @Data public class UserType { @Id private Long id; private String type; } Having schema as :
Table User:
 Column : id (Primary key), name , user_type_id foreign key to UserType.id column
Table UserType
 Column : id (Primary key), name
User type is master table, whenever we need to add user, based on type we select and create user.
This should work normally with UserRepository<User, Long>.
But when we use this schema and classes, it generates wrong query as it accepts User.id should be present in UserType table.
Which is wrong as this is master table, I dont want it to grow when new user added.
similar question on Stack overflow
Metadata
Metadata
Assignees
Labels
status: waiting-for-triageAn issue we've not yet triagedAn issue we've not yet triaged