I am getting javax.persistence.EntityNotFoundException error when I am trying to get User through Invoice object
invoice.getUser().getId()
Maybe one comes to this answer and finds it useful: In my case, I have marked my entity as deleted and entity who is relationship with this entity could not find it. So, changing deleted to false worked for me.