1 Kings 9 makes it abundantly clear that all these promises to David were continent on his sons and grandsons keeping God's law and not chasing foreign gods.
[1Ki 9:4-7 KJV] 4 And if thou wilt walk before me, as David thy father walked, in integrity of heart, and in uprightness, to do according to all that I have commanded thee, [and] wilt keep my statutes and my judgments: 5 Then I will establish the throne of thy kingdom upon Israel for ever, as I promised to David thy father, saying, There shall not fail thee a man upon the throne of Israel. 6 [But] if ye shall at all turn from following me, ye or your children, and will not keep my commandments [and] my statutes which I have set before you, but go and serve other gods, and worship them: 7 Then will I cut off Israel out of the land which I have given them; and this house, which I have hallowed for my name, will I cast out of my sight; and Israel shall be a proverb and a byword among all people:
It would appear that the court historians forgot to mention that detail when they wrote about it in Samuel/Chronicles. Politics at their finest.
There is something you guys EVER appear oblivious of.
The witness of the following...
Exodus 32:9 And the LORD said unto Moses, I have seen this people, and, behold, it is a stiffnecked people: 32:10 Now therefore let me alone, that my wrath may wax hot against them, and that I may consume them: and I will make of thee a great nation. 32:11 And Moses besought the LORD his God, and said, LORD, why doth thy wrath wax hot against thy people, which thou hast brought forth out of the land of Egypt with great power, and with a mighty hand? 32:12 Wherefore should the Egyptians speak, and say, For mischief did he bring them out, to slay them in the mountains, and to consume them from the face of the earth? Turn from thy fierce wrath, and repent of this evil against thy people. 32:13 Remember Abraham, Isaac, and Israel, thy servants, to whom thou swarest by thine own self, and saidst unto them, I will multiply your seed as the stars of heaven, and all this land that I have spoken of will I give unto your seed, and they shall inherit it for ever. 32:14 And the LORD repented of the evil which he thought to do unto his people.
Romans 9:6 Not as though the word of God hath taken none effect. For they are not all Israel, which are of Israel: 9:7 Neither, because they are the seed of Abraham, are they all children: but, In Isaac shall thy seed be called. 9:8 That is, They which are the children of the flesh, these are not the children of God: but the children of the promise are counted for the seed. 9:9 For this is the word of promise, At this time will I come, and Sarah shall have a son. 9:10 And not only this; but when Rebecca also had conceived by one, even by our father Isaac; 9:11 (For the children being not yet born, neither having done any good or evil, that the purpose of God according to election might stand, not of works, but of him that calleth; )
That "children being not yet born, neither having done any good or evil - THAT the purpose of God according to election might stand, not of works, but of him that calleth;" as an everlasting principle was obviously still the case in Paul's day, many, many centuries later.
THIS is what you guys continually fail to consider - the ISRAELITE principle of "the purpose of God according to election."
Malachi 3:6 For I am the LORD, I change not; therefore ye sons of Jacob are not consumed.
Or as that writer writing to the HEBREWS also put it...
Hebrews 13:8 Jesus Christ the same yesterday, and to day, and for ever.