It is about transaction handling. Your transaction usually starts when calling an EJB method from a non EJB environment and finishes at the end of the same EJB method. So updateEmployee and updateStudent runs in the same EJB (JTA) transaction.
When calling update(), the EJB transaction starts. When calling updateEmployee and updateStudent, changes are saved in memory. At the end of the update() method, when the transaction seems successful, OpenJPA starts to persist all non-persisted changes from memory to the database in any order. If persisting these changes succeeded, then sends a commit to the database. If database commit succeeded, then it finishes the EJB transaction with success.
If you want to persist the data in the same order, you can use the flush() method of the EntityManager. Or you can start a new transaction for updateStudent and updateEmployee methods:
@TransactionAttribute(REQUIRES_NEW)
public void updateStudent(...) {...}