You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know it's tricky to identify bidirectional relationships, and the default behavior is to map two unidirectional relationships.
However, if you can read the JPA annotations, you can also identify the "mappedBy" attributes and create a bidirectional relationship.
It shouldn't be a configuration dependent on displaying the JPA annotations, though. Someone can use the JPA mappedBy to have a more "correct" model but not necessarily decide to display the annotations on the diagram.
So, I suggest a separate configuration for using JPA annotations with "mappedBy" to create bidirectional relationships in the diagram.
There should also be an option to display the arrow on the relationship when it's directional because, in this case, we can tell what is directional and what isn't with certainty.
This will not only make the charts easier to read. It's going to make them correct. We are dealing with incorrect charts because of technological restraints (when we don't have the metadata to connect two ends of a relationship), but it doesn't always have to be the case. We can get accurate charts in these circumstances, and I think we should do it.
The text was updated successfully, but these errors were encountered:
pplupo
changed the title
Bidirectional relationships using "mappedBy"
Correcting bidirectional relationships using JPA's "mappedBy"
Oct 30, 2024
I know it's tricky to identify bidirectional relationships, and the default behavior is to map two unidirectional relationships.
However, if you can read the JPA annotations, you can also identify the "mappedBy" attributes and create a bidirectional relationship.
It shouldn't be a configuration dependent on displaying the JPA annotations, though. Someone can use the JPA mappedBy to have a more "correct" model but not necessarily decide to display the annotations on the diagram.
So, I suggest a separate configuration for using JPA annotations with "mappedBy" to create bidirectional relationships in the diagram.
There should also be an option to display the arrow on the relationship when it's directional because, in this case, we can tell what is directional and what isn't with certainty.
This will not only make the charts easier to read. It's going to make them correct. We are dealing with incorrect charts because of technological restraints (when we don't have the metadata to connect two ends of a relationship), but it doesn't always have to be the case. We can get accurate charts in these circumstances, and I think we should do it.
The text was updated successfully, but these errors were encountered: