ClassCastException fix for EntityIdColumn