I have an entity User
and it should have property manager
where manager is another user (one manager can manage many users, any user may have only 1 manager or have not any).
How can I implement this?
I tried something standard
@ManyToOne
@JoinColumn (name = ??? /* what should be here? */, nullable = true)
private User manager;
but it's not as simple as it seems..