Avoid N+1 queries when serializing events