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
Hi I have chains with MovementEntities with a OneToOne relation.
public class MovementEntity {
...
@OneToOne(optional = true, fetch = FetchType.LAZY)
@JoinColumn(name = "PARENT_MOVEMENT_ID")
private MovementEntity parentClientSecurityMovement;
The optimizer show me this error: Hypersistence Optimizer : CRITICAL - OneToOneWithoutMapsIdEvent - The [parentClientSecurityMovement] one-to-one association in the [tech.lightframe.shift.cbs.operation.MovementEntity] entity is using a separate Foreign Key to reference the parent record. Consider using @MapsId so that the identifier is shared with the parent row. For more info about this event, check out this User Guide link - https://vladmihalcea.com/hypersistence-optimizer/docs/user-guide/#OneToOneWithoutMapsIdEvent
But this strategy is not applicable when parent and child are in the same table. They are different instances and can't have the same Id.
I think the optimizer should filter these cases.
The text was updated successfully, but these errors were encountered:
Hi I have chains with MovementEntities with a OneToOne relation.
The optimizer show me this error:
Hypersistence Optimizer : CRITICAL - OneToOneWithoutMapsIdEvent - The [parentClientSecurityMovement] one-to-one association in the [tech.lightframe.shift.cbs.operation.MovementEntity] entity is using a separate Foreign Key to reference the parent record. Consider using @MapsId so that the identifier is shared with the parent row. For more info about this event, check out this User Guide link - https://vladmihalcea.com/hypersistence-optimizer/docs/user-guide/#OneToOneWithoutMapsIdEvent
But this strategy is not applicable when parent and child are in the same table. They are different instances and can't have the same Id.
I think the optimizer should filter these cases.
The text was updated successfully, but these errors were encountered: