Fixed issue with foreign key transformationz