EntityManager acceptChanges/rejectChanges + fix for poor perf on badly constructed named queries.