@MappedSuperclass
abstract public class Services {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
protected long id;
@ManyToOne(cascade = CascadeType.REFRESH)
@JoinColumn(name = "from_account_id")
@OnDelete(action = OnDeleteAction.CASCADE)
protected Account fromAcc;
...