Whether written for, or by Solomon, does not alter the instruction and comfort of the song. Whether it speaks of Solomon’s house, or ours, or the house of God, in no way alters its teaching. The main emphases are dependence on God, and the blessings of children. They are God’s heritage and our reward. This is a general promise to those who fear God, but also shows that children are the heritage for the Lord, as well as from Him. The building of a family or a church proceeds only by His favour. He withholds or gives according to His design and purpose. In the New Testament our Lord displays his love and concern for children, and accounts them as His, for they were covenant children that were brought to Him.
So it is with spiritual children, they are His heritage and reward for doing the will of God. The barren woman, which in Scripture signifies the church, can, under His blessings, flourish and bring forth.