Make the entities serializable.