Quite a few entities have exactly this code - I wonder what is the cleanest way of removing the duplication.