حَدَّثَنَا مَحْمُودُ بْنُ غَيْلاَنَ، حَدَّثَنَا أَبُو أُسَامَةَ، حَدَّثَنَا بُرَيْدٌ، عَنْ أَبِي بُرْدَةَ، عَنْ أَبِي مُوسَى، عَنِ النَّبِيِّ ـ صلى الله عليه وسلم ـ قَالَ ‏"‏ رَأَيْتُ فِي الْمَنَامِ أَنِّي أُهَاجِرُ مِنْ مَكَّةَ إِلَى أَرْضٍ بِهَا نَخْلٌ فَذَهَبَ وَهَلِي إِلَى أَنَّهَا يَمَامَةُ أَوْ هَجَرٌ فَإِذَا هِيَ الْمَدِينَةُ يَثْرِبُ وَرَأَيْتُ فِي رُؤْيَاىَ هَذِهِ أَنِّي هَزَزْتُ سَيْفًا فَانْقَطَعَ صَدْرُهُ فَإِذَا هُوَ مَا أُصِيبَ مِنَ الْمُؤْمِنِينَ يَوْمَ أُحُدٍ ثُمَّ هَزَزْتُهُ فَعَادَ أَحْسَنَ مَا كَانَ فَإِذَا هُوَ مَا جَاءَ اللَّهُ بِهِ مِنَ الْفَتْحِ وَاجْتِمَاعِ الْمُؤْمِنِينَ وَرَأَيْتُ فِيهَا أَيْضًا بَقَرًا وَاللَّهُ خَيْرٌ فَإِذَا هُمُ النَّفَرُ مِنَ الْمُؤْمِنِينَ يَوْمَ أُحُدٍ وَإِذَا الْخَيْرُ مَا جَاءَ اللَّهُ بِهِ مِنَ الْخَيْرِ بَعْدُ وَثَوَابِ الصِّدْقِ الَّذِي آتَانَا اللَّهُ بِهِ يَوْمَ بَدْرٍ ‏"‏ ‏.‏

It wasnarrated from Abu Musa that the Prophet (PBUH) said: “In adream Isaw myself emigrating from Makkah to a land in which thereweredate-palm trees, and I thought that it was Yamamah or Hajar, butitwas Al-Madinah, Yathrib. And I saw in this dream of mine that I waswielding a sword then it broke in the middle. That was what befellthebelievers on the Day of Uhud. Then I wielded it again and it wasbetter than it had been before, and that is what Allah brought aboutof the Conquest and the regrouping of the believers. And I also sawcows, and by Allah it is good, for they are the group of thebelievers(who were martyred) on the Day of Uhud, and the goodness isthat whichAllah brought forth after that, and the reward of thetruth whichAllah brought us on the Day of Badr.” Translation Not Available

Book Ref: Sunan Ibn Majah Book 35 Hadith 3921
Web Ref:  Sunan Ibn Majah Vol 5 Book 35 Hadith 3921