update compileAdd function to fix #27 issue on foreign key