It has to be checked if the cement is in place or come out. If it has come out it can be replaced. But if the cement is in place and it still hurts, the cavity may be very deep. In children various treatment options like pulp capping, pulpotomy etc are available. In some cases root canal treatment may be required. As the child is young it is important to preserve the tooth.
Next Steps
Depending on clinical examination your dentist will suggest one of the options.