I am getting javax.persistence.EntityNotFoundException error when I am trying to get User through Invoice object
invoice.getUser().getId()
Use @NotFound(action = NotFoundAction.IGNORE) in case it's parent not exist
By using cascade=CascadeType.ALL it will delete it's parent entity