Rabbi Yehudah says: It was the day of the rising of the Nile, and all went to see it, but he did not go; rather, "he came into the house to do his work" — to reckon his master's accounts. Rabbi Nehemiah says: It was the day of the theater, and all went to watch, but he did not go. Rabbi Shmuel bar Nachman said: "To do his work" literally. Rav Hiyya taught: he saw the image of his father and his blood cooled, as it says, "By the hands of the Mighty One" (Genesis 49:24). Rav Huna in the name of Rav taught: he saw the image of his mother and his blood cooled, as it says, "From there the Shepherd, the Stone of Israel." Who did this? "From the God of your father, who will help you" (Genesis 49:25). Concerning what we learned, that the primary categories of labor are forty less one — corresponding to what? Rabbi Hanina said: corresponding to the services of the Tabernacle. Rabbi Shimon ben Yosi ben Lakunya said: corresponding to the number of times "work" and "works" appear in the Torah. Rav Yosef asked: Is this "he came into the house to do his work" included in the count or not? When he came to join with her, the Holy One came in the image of his father, and his desire cooled, as it says, "His bow remained firm" (Genesis 49:24). She said, "What is wrong with you?" He said, "I see my father." She said, "Where is he? There is no one of the men of the house here." He said, "You are a daughter of donkeys — 'whose flesh is the flesh of donkeys' (Ezekiel 23:20) — and a donkey does not see, but I am of those who see, as it says, 'And he saw the place from afar.'" That day all went to the idol and she made herself out to be ill. When they returned, her companions came to visit her. They said, "Why is your face like this?" She told them all that had happened. They said, "You have no remedy except to tell your husband such and such, and he will imprison him." She said to them, "Please, may each of you tell your husbands that he made advances to you as well" — and they did so. All the officers entered Potiphar's courtyard and told him. He wished to kill Joseph. She said, "Do not kill him and lose your money; rather imprison him." Even so he wished to kill him, until Asenath came secretly to Potiphera and swore to him and told the truth. The Holy One said to her, "By your life, since you plead his merit, the tribes I raise from him shall come through you." And some say she was the daughter of Dinah, but Potiphera raised her.
The Image of His Father Cooled Joseph's Blood
Yalkut Shimoni on Torah 146:3
רַבִּי יְהוּדָה אוֹמֵר, יוֹם גִּדּוּל נִילוּס הָיָה, וְהָלְכוּ כֻּלָּן לִרְאוֹתוֹ וְהוּא לֹא הָלַךְ אֶלָּא וַיָּבֹא הַבַּיְתָה לַעֲשׂוֹת מְלַאכְתּוֹ, לַחֲשֹׁב חֶשְׁבּוֹנוֹת שֶׁל רַבּוֹ. רַבִּי נְחֶמְיָה אוֹמֵר, יוֹם טֵיאַטְרוֹן הָיָה וְהָלְכוּ כֻּלָּן לִרְאוֹת וְהוּא לֹא הָלַךְ. רַבִּי שְׁמוּאֵל בַּר נַחְמָן אָמַר, לַעֲשׂוֹת מְלַאכְתּוֹ מַמָּשׁ רַב חִיָּא מַתְנֵי, אִקּוּנִין שֶׁל אָבִיו רָאָה וְצָנַן דָּמוֹ, שֶׁנֶּאֱמַר (בראשית מט, כד) "מִידֵי אֲבִיר" רַב הוּנָא בְּשֵׁם רַב מַתְנֵי, אִקּוּנִין שֶׁל אִמּוֹ רָאָה וְצָנַן דָּמוֹ, שֶׁנֶּאֱמַר "מִשָּׁם רֹעֶה אֶבֶן יִשְׂרָאֵל" מִי עָשָׂה כָּךְ, (שם כה) "מֵאֵל אָבִיךָ וְיַעְזְרֶךָּ". הָא דִּתְנַן, אָבוֹת מְלָאכוֹת אַרְבָּעִים חָסֵר אַחַת כְּנֶגֶד מִי. אָמַר רַבִּי חֲנִינָא, כְּנֶגֶד עֲבוֹדוֹת הַמִּשְׁכָּן. רַבִּי שִׁמְעוֹן בֶּן יוֹסֵי בֶּן לַקוּנְיָא אָמַר, כְּנֶגֶד מְלָאכָה וּמְלָאכוֹת שֶׁבַּתּוֹרָה, בָּעֵי רַב יוֹסֵף, הַאי וַיָּבֹא הַבַּיְתָה לַעֲשׂוֹת מְלַאכְתּוֹ מִמִּנְיָנָא הוּא אוֹ לֹא. מִסַּפְּקָא לֵיהּ מִשּׁוּם דִּכְתִיב "וְהַמְּלָאכָה הָיְתָה דַיָּם" וְהָא כְּמַאן דְּאָמַר לַעֲשׂוֹת צְרָכָיו נִכְנַס, אוֹ דִּלְמָא וַיָּבֹא הַבַּיְתָה לַעֲשׂוֹת מְלַאכְתּוֹ מִמִּנְיָנָא וְהַכִי קָאָמַר דִּשְׁלִימָא לְהוּ עֲבִידְתָּא. כֵּיוָן שֶׁבָּא לִזָּקֵק לָהּ בָּא הַקָּדוֹשׁ בָּרוּךְ הוּא בִּדְמוּת אָבִיו וְנִתְקָרְרָה אַמָּתוֹ, שֶׁנֶּאֱמַר (בראשית מט, כד) "וַתֵּשֶׁב בְּאֵיתָן קַשְׁתּוֹ". אָמְרָה לוֹ מַה לָּךְ, אָמַר לָהּ, אַבָּא אֲנִי רוֹאֶה. אָמְרָה לֵיהּ, וְהֵיכָן הוּא, וְאֵין אִישׁ מֵאַנְשֵׁי הַבַּיִת. אָמַר לָהּ, אַתְּ בַּת חֲמוֹרִים, (יחזקאל כג, כ) "אֲשֶׁר בְּשַׂר חֲמוֹרִים בְּשָׂרָם" וַחֲמוֹר אֵינוֹ רוֹאֶה אֲבָל אֲנָא מִן הָרוֹאִים, שֶׁנֶּאֱמַר "וַיַּרְא אֶת הַמָּקוֹם מֵרָחוֹק". אוֹתוֹ הַיּוֹם הָלְכוּ כֻּלָם לַעֲבוֹדָה זָרָה וְהִיא עָשְׂתָה עַצְמָהּ חוֹלָה. כֵּיוָן שֶׁחָזְרוּ הָלְכוּ חַבְרוֹתֶיהָ לְבַקְּרָהּ. אָמְרוּ לָהּ, מַה לָּךְ שֶׁפָּנַיִךְ כַּךְ, סִפְּרָה לָהֶן כָּל הַמְּאֹרָע. אָמְרוּ לָהּ, אֵין לָךְ תַּקָּנָה אֶלָּא אֱמוֹר לְבַעְלֵךְ כָּךְ וְכָךְ וְיַחְבְּשֶׁנּוּ בְּבֵית הָאֲסוּרִין. אָמְרָה לָהֶן, בְּבַקָּשָׁה מִכֵּן שֶׁתֹּאמַרְנָה כָּל אַחַת וְאַחַת [לְבַעֲלֵיכֶן] שֶׁאַף לָכֶן תָּבַע, וְעָשׂוּ כֵן. וְנִכְנְסוּ כָּל הַשָּׁרִים לַחֲצֵרוֹ שֶׁל פּוֹטִיפַר וְסִפְּרוּ לוֹ. רָצָה לְהָרְגוֹ. אָמְרָה לֵיהּ, אַל תַּהַרְגֶּנּוּ וּתְאַבֵּד מָעוֹתֶיךָ אֶלָּא תַּחְבְּשֶׁנוּ, אַפִלּוּ כֵּן רָצָה לְהָרְגוֹ עַד שֶׁבָּאת אָסְנַת בַּסֵּתֶר אֶל פּוֹטִיפֶרַע וְנִשְׁבְּעָה לוֹ וְסִפְּרָה הָאֱמֶת. אָמַר לָהּ [הַקָּדוֹשׁ בָּרוּךְ הוּא], חַיַּיִךְ, הוֹאִיל וְאַתְּ לוֹמֶדֶת עָלָיו זְכוּת, שְׁבָטִים שֶׁאֲנִי מַעֲמִיד מִמֶּנּוּ עַל יָדַיִךְ הֵם בָּאִים. וְיֵשׁ אוֹמְרִים, בַּת דִּינָה הָיְתָה אֶלָּא שֶגִּדְּלָהּ פּוֹטִיפֶרַע.