The problem is that somewhere in your code (but I can't find where) you are trying to persist an already existing Entity Statemst maybe because you are persisting a Companymst Entity that is cascading the operation on the linked Class and the error is the
You say that you are selecting a row:
Editing an Item (executing this part of code)
that do nothing, and save the item calling
where the only thing done is calling the entityManager.getTransaction().commit(). I can't figure out which operations are going to be commited at this time. Maybe having you previously pushed the addNew button, entityManager.persist(c) is the operation you're trying to commit. If so, you should try to change that in entityManager.merge(c); or try to block the cascade type from master to detail, things that I can see you have already done setting the comment on:
And by default, JPA does not cascade any persistence operations to the target of the association.