Problem I have created three entities with the strategy InheritanceType.JOINED. Parent entity looks like this:
The first child is:
The second child is:
Here parent has a column of jsonb type whose type is being passed by child entities using generics argument A<E extends AJsonContent> and argument should of subtype AJsonContent. BAttribute and CAttribute are children of AJsonContent and they represent jsonb column. Now, when bRepository.findById() is called, it returns an instance of B with jsonb column CAttribute instead of BAttribute. When I removed C entity completely, then it is working fine. But when it B and C are both together it fetches the wrong jsonb column for the B entity. What could be the reason for this behavior? |