
    Isaiah Nieukirk, Appellee, v. Rebecca Nieukirk, Appellant.
    1. Pleading: motion to strike: raising same question by demurrer. Where, after the original petition in. a cause had been withdrawn, and a substituted petition filed, the defendant appeared, and moved to strike the latter from the files upon the ground that it presented an entirely different cause of action from that presented in the original petition, and upon such motion being overruled filed a demurrer attacking said pleading upon the same ground, and also upon the merits of the cause of action alleged, which was likewise overruled, held, that by filing the demurrer the defendant waived his right to have the ruling of the court upon the motion to 'strike reviewed in the supreme court.
    2. Husband and Wife: divorce: contracts with relation to division of property. A eontraetbetween a husband and wife providing for a division of the husband’s property in the event of a divorce being granted in a suit pending, otherwise to be of no force or effect, is valid.
    3. Pleading: petition: relief. Where the facts alleged in a petition entitle the plaintiff to a part of the relief asked, the defendant cannot, by demurrer to the petition as a whole, attack the insufficiency of the allegations of the petition as a basis for other relief prayed therein.
    
      
      Appeal from Washington District Court. — Hon. J. K,. Johnson, Judge.
    Thursday, January 28, 1892.
    This is an action for a decree foreclosing a lien upon certain real estate, and ordering a sale to pay the-amount found to be due. Tbe defendant resisted tbe claim made in a substituted petition by a motion to strike tbe same from tbe files, and by a demurrer, both of wbicb were overruled, and a decree entered for tbe-plaintiff.
    
      Affirmed.
    
    
      Warren Harmon and JRickel & Crocker, for appellant.
    
      Dewey & Dicker, for appellee.
   Rothrook, J.

Tbe plaintiff and tbe defendant were formerly husband and wife. It appears from tbe record that on tbe seventeenth day of September, 1889, tbe plaintiff filed a petition in tbe court below, in which be sought to obtain a decree setting aside and annulling a decree of divorce between tbe parties, wbicb was before that entered in tbe district court of Linn county, at tbe suit of tbe defendant. Tbe claim made in the petition to set aside tbe decree was that it was procured by fraud. On the twenty-fifth day of December, 1889, tbe plaintiff withdrew bis petition, and “dismissed all claims and actions therein prayed for,” and asked to be beard on a substituted petition, which be then filed. Tbe record does not show that there was any appearance to the original petition by tbe defendant, and it is conceded that tbe district court of Washington county bad no jurisdiction to enter a decree canceling and setting aside tbe decree of divorce entered by tbe district .court of Linn county. Afterwards tbe defendant filed a motion to strike tbe substituted petition from the files, upon the ground, among others, that it was not an amendment, bnt is an entirely different cause of action than that set up in the original petition. This motion was overruled, and the defendant excepted to the ruling. On the twenty-fifth day of February, 1890, the defendant filed a demurrer to the substituted petition. It was claimed in the demurrer that the substituted petition was an entirely new cause of action. In addition to this ground, the defendant, by the demurrer, attacked the merits of the substituted pétition, and claimed that it did not present a cause of action.

It is now strenuously contended in behalf of the defendant that the court erred in overruling the motion to strike the substituted petition. We do t it • t » *t *i t i • • • not think that the aeiendant is m a position to present that question. She did not stand on her motion, but filed her demurrer attacking the petition on its merits. The fact that the ground of the motion was repeated in the demurrer does not aid the defendant. A party has no right to demand repeated decisions of the court on the same question, presented first by motion and after-wards by demurrer. If the substituted petition was vulnerable to the objection, it was properly made by the motion; and, when the ruling was made on that, it was an end of the question in that court. When the defendant afterwards attacked the petition on its merits, it was an appearance to the merits, and waived the ruling on the motion; and in thus holding it is proper to repeat that the record does not show that the defendant made any appearance until the motion to strike the substituted petition was filed.

II. We come now to the questions raised by the demurrer, involving the sufficiency of the The cause of action substituted petition, is founded upon a written instrument, of " ' ' which the following is a copy:

“Know all that I, Rebecca Nieukirk, of the county of Linn, state of Iowa, do acknowledge myself indebted to Isaiah Nieukirk in the sum of two hundred dollars, and for the purpose of securing the payment of the same I hereby convey to said Isaiah Nieukirk lots 5 and 6, and south half of lots 7 and 8, in block 12 in the town of Brighton, Washington county, Iowa; the intent of this conveyance and security being that on sale of said real estate at any time by said Rebecca Nieukirk she shall pay over of the selling price of said property to said Isaiah Nieukirk the sum of two hundred dollars. And specially is it understood that this shall fix the interest of said Isaiah Nieukirk in said property, any order, decree or judgment of the district court hereinafter entered to the contrary notwithstanding. But in the event no decree of divorce shall be granted by the district court of Linn county, Iowa, then this contract, conveyance and lien shall be of no force or effect. Done this April 3, 1889.
“Mrs. Rebecca Nieukirk.
“Witness: FrankE. Pollens.”

This instrument was acknowledged and recorded on the seventh day of May, 1889. The divorce was granted on the fifteenth day of April, 1889. It is evident from the instrument itself that it was in the nature of a settlement of the property interests of the parties in case a divorce should be granted. So far as appears from the face of the petition and from the instrument itself, the instrument was not void as against public policy, as claimed by counsel for the appellant. The title to the lots described was in the plaintiff when the suit for a divorce was commenced, and it was perfectly competent for the parties to agree that, if the defendant should be successful in her divorce case, the property should be decreed to her, and there could be no valid objection if the parties so agreed that the plaintiff herein should have a lien thereon for two hundred dollars. The whole transaction, as shown by the written instrument and the averments of the petition, amounts in substance to just such an arrangement as has been stated. It was wholly immaterial which- one of the parties held the legal title when the instrument was executed. It became operative when the decree of divorce was entered, and the title was thereby transferred to the defendant, just the same as if the plaintiff had made the conveyance and taken the lien back for •the two hundred dollars. That a husband and wife may contract with each other with reference to a division of the property on the dissolution of the marriage relation by divorce, provided the contract is reasonably just and fair, see Blake v. Blake, 7 Iowa, 46, and Martin v. Martin, 65 Iowa, 255. There is no reason to think from anything contained in this petition and in the written instrument that any advantage was taken of the defendant by the plaintiff in surrendering the lots to her and taking a lien upon them; and in view of the contract between the parties it is wholly immaterial what the form of the decree of divorce was in reference to the title. As we have said, the lien became operative the moment that the absolute title was established and confirmed in the defendant by the decree.

III. There is but one further question which we deem it proper to consider. It will be observed that the contract of lien provides that on the sale of said real estate at any tim& by said Rebecca Nieuktrk she shall pay over of the selling price of said property to said Isaiah Nieukirk the sum of two hundred dollars. It is claimed that the petition is defective because it does not appear therefrom that at the time the action was commenced a sale had been made, or demand made to make a sale, and that there was therefore no right in the plaintiff to enforce the alleged lien. We think that the facts stated in the petition authorize a decree for the plaintiff establishing his lien. He made this request in the prayer of his petition. It was therefore not demurrable on tbe ground stated. Tbe defendant stood on tbe demurrer, and a decree was entered for tbe plaintiff. It is true that in the prayer of bis petition be also requested a decree directing tbe sale of tbe property. It may be that be claimed more relief than be was entitled to. If be did, tbe defendant should have answered tbe petition, and made an issue as to tbe right to tbe relief demanded, so far as it was sought to have an immediate sale of tbe property to pay tbe lien.

Tbe decree of tbe district court is aenirmed.  