I already discussed the situation with a coworker, but we couldn't explain why this works.
I'm getting a list of Entitys from the DB without detaching them.
List<Announcement> announcements = new JPAQuery(em).from(QANNOUNCEMENT).where(QANNOUNCEMENT.customer.eq(p.getCustomer()).and((QANNOUNCEMENT.person.eq(p)).or(QANNOUNCEMENT.person.isNull()))).list(QANNOUNCEMENT);
After modifying one value I get a Transaction in which I execute the following
em.merge(announcement);
em.flush();
The result is, that the Entity is updated in the Database without any issues.
How can a merge work a non detached Entity?