throw exception when trying to transact empty entity