fixes #21

Calling _p_invalidate() causes the object to be reloaded from the database. Though there is still a database conflict which is resolved by using transaction.commit() before invalidation.