It is narrated from Sayyiduna al-Bara' bin Azib (may Allah be pleased with him): "The Messenger of Allah (peace and blessings be upon him) was asked about the children of the Muslims, and he (peace and blessings be upon him) said: 'They will be with their fathers.' Then he (peace and blessings be upon him) was asked about the children of the polytheists, and he (peace and blessings be upon him) said: 'They (too) will be with their fathers.' It was said: But they did not do any deeds. He (peace and blessings be upon him) said: 'Allah knows best (what they would have done).'"
Imam Musaddad and Imam Abu Ya'la recorded it with a chain in which one narrator is not named.