Terumos10: 1
בָּצָל שֶׁנְּתָנוֹ בְתוֹךְ עֲדָשִׁים, אִם שָׁלֵם, מֻתָּר; וְאִם חִתְּכוֹ, בְּנוֹתֵן טַעַם. וּשְׁאָר כָּל הַתַּבְשִׁיל, בֵּין שָׁלֵם בֵּין מְחֻתָּךְ, בְּנוֹתֵן טַעַם. רַבִּי יְהוּדָה מַתִּיר בְּצַחֲנָה, שֶׁאֵינוֹ אֶלָּא לִטּוֹל אֶת הַזּוּהֲמָא.
[If] one placed an onion in lentils, if it is whole, [it is] permitted; but if he cut it, [it depends upon] whether it imparts flavor. And [regarding] any other cooked food, whether whole or cut, [it depends upon] whether it imparts flavor. R' Yehudah permits [it] in tzachanah, since it is [there] only to take away the foul odor.