Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Entity
- @Table(name="EntityDO")
- public class EntityDO {
- @Id
- private Long id;
- @Column(nullable = false)
- private String name;
- @OneToMany(mappedBy = "parentEntity")
- private Set<EntityDO> ownedEntities;
- @ManyToOne
- @JoinColumn(name="PARENT_ID", nullable=true)
- private EntityDO parentEntity;
- ...
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement