Using custom codec to store visibilities directly in stored fields