Add trait to class transformation query