Created
July 13, 2018 06:04
-
-
Save mohamed-gara/02505b45da9fb1ee1eca04068603170d to your computer and use it in GitHub Desktop.
Person with parents relationship
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity | |
@Data | |
public class Person extends core.Person { | |
@ManyToOne(fetch = LAZY) | |
@NotFound(action = NotFoundAction.IGNORE) | |
private Person mother; | |
@ManyToOne(fetch = LAZY) | |
@NotFound(action = NotFoundAction.EXCEPTION) | |
private Person father; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment