
    (November 22, 1919.)
    WESTERN LOAN & BUILDING COMPANY, a Corporation, Appellant, v. GEM STATE LUMBER COMPANY, a Corporation, Respondent.
    [185 Pac. 554.]
    Appeal and Eeeoe — Fundamental Eeeoe — Mechanic’s Lien — PsiOBITY.
    1. An. objection that tie complaint does not state facts sufficient to constitute a cause of action is fundamental. It is never waived, and may be considered by an appellate court, even in the absence of a specification of error.
    [As to right to question sufficiency of complaint for the first time on appeal, see note in 3 Ann. Cas. 545.]
    2. Under C. S., spc. 7349, a mechanic’s lien does not continue unless proceedings are commenced in a proper court against the person, or persons, against whose interest the lien is asserted, within the time limited by the statute.
    APPEAL from the District Court of the Fourth Judicial District, for Twin Falls County. Hon. Wm. A. Babcock, Judge.
    -Action by plaintiff for the foreclosure of mortgage. Cross-complaint by defendant Gem State Lumber Company for the foreclosure of materialmen’s lien. Judgment for cross-complainant.
    
      Reversed.
    
    Sweeley & Sweeley, for Appellant.
    As the lumber company did not bring suit to foreclose its lien as against the appellant within six months from the time statement for a lien was filed, its lien as to the appellant had expired when this action was commenced, for which reason the cross-complaint of the lumber company did not, as against the appellant, state a cause of action. (I). W. Standrod & Co. v. Utah Implement-Vehicle Co., 223 Fed. 517, 139 C. C. A. 65.)
    Under the mechanic’s lien law of Idaho, which requires suit for enforcement to be brought within six months after filing of the lien claim, the lien is void as to all subsequent encumbrancers who are not made parties to the'’ suit to foreclose within the six months. {Utah Implement-Vehicle Go. v. Bowman, 209 Fed. 942; Continental & Commercial Trust & Savings Bank v. Pacific Coast Pipe Co., 222 Fed. 781,138 C. C. A. 329; Davis v. Bartz, 65 Wash. 395, 118 Pac. 334; Union National Savings & Doom Assn. v. Halberg, 152 Ind. 139, 51 N. E. 916; Deming-Colborn Lumber Co. v. Union National Savings .& Loan Assn., 151 Ind. 463, 51 N. E. 936; Stoermer v. People’s Sav. Bank, 152 Ind. 104, 52 N. E. 606; Martin v. Berry, 159 Ind. 566, 64 N. E. 912; Ward v. Yarnelle, 173 Ind. 535, 91 N. E. 7; Gile Investment Co. v. Fisher, 104 Wash. 613, 177 Pac. 710; Ballard v. Thompson, 40 Neb. 529, 58 N. W. 1133j Frates v. Sears, 144 Cal. 246, 77 Pac. 905.^
    W. P. Guthrie, for Respondent.
    In case of doubt as to the time when the limitation of an action begins to run under a statute, that construction must be given which is most favorable to the common-law right of the citizen. {Schneider v. Hussey, 2 Ida. 8, 1 Pac. 343.)
    The provisions of the mechanic’s lien law are to be liberally construed to effect its objects and promote justice. {Phillips v. Salmon River Min. etc. Co., 9 Ida. 149, 72 Pac. 886; Thomas 1). Hoge, 58 Kan. 166, 48 Pae. 844; Blanshard v. Schwartz, 7 Okl. 23, 54 Pac. 303, 306.)
    Pure defenses are held not to be barred by the statute of limitations. (25 Cyc. 1063, n. 91.)
   RICE, J.

On May 3, 1913, J. B. Robinson executed.and delivered to appellant a mortgage covering a lot in the town site of Burley. On Oct. 13, 1913, respondent filed in the office of the -recorder of Cassia county a claim of lien for material furnished in the construction of a building located upon the premises. Prior to April 1, 1914, respondent commenced an action against Robinson for the foreclosure of its lien. Appellant was not made a party defendant in that action. Appellant commenced this action for the foreclosure of its mortgage Sept. 7, 1914. Robinson and his wife defaulted. Respondent answered, and with its answer filed a cross-complaint, in which, it set out its claim of lien and asked for a foreclosure thereof against appellant. The trial court found that the lien of respondent was prior to that of the mortgagee, and decree was entered accordingly, from which plaintiff appealed. >

The record does not contain a demurrer to the cross-complaint. However, an objection that the complaint does not state facts sufficient to constitute a cause of action is never waived. (C. S., sec. 6693.) The court should not affirm a judgment where it is apparent that the facte stated in the complaint do not present a sufficient foundation to sustain it, even though the insufficiency of the complaint is not assigned as error. (Wyatt v. Henderson, 31 Or. 48, 48 Pac. 790; Hankamer v. County Commrs. Court (Tex. Civ.), 154 S. W. 623; Whitten v. Whitten (Tex. Civ.), 157 S. W. 277.)

C. S., sec. 7349, reads as follows: “No lien provided for in this chapter binds any building, mining claim, improvement or structure for a longer period than six months after the claim has been filed, unless proceedings be commenced in a proper court within that time to enforce such lien; or if credit be given, then six months after the expiration of such credit; but no lien shall continue in force under this chapter for a longer period than two years from the time the work is completed, or credit given, unless proceedings to enforce the same shall have been commenced.”

It appears from the record in this case that no credit was given to the owner of the building, and hence the six months’ period of limitation applies.

Section 7349 has not been construed by this court with relation to the right of a claimant of a mechanic’s lien to foreclose the same against a mortgagee unless his action is commenced against the mortgagee within six months after the claim has been filed. It has been construed, however, by the federal court in the cases of Utah Implement-Vehicle Co. v. Bowman, 209 Fed. 942; Continental etc. Bank v. Pacific Coast Pipe Co., 222 Fed. 781, 138 C. C. A. 329; D. W. Standrod & Co. v. Utah Implement-Vehicle Co., 223 Fed. 517, 139 C. C. A. 65.

In the case of Utah Implement-Vehicle Co. v. Bowman, supra, the question involved was stated as follows: ‘ ‘ The precise question therefore, is whether or not a lien claimant under the mechanic’s lien law of Idaho loses his priority of lien as against a junior mortgagee, by foreclosing his lien without bringing in and making a party to such foreclosure suit the mortgagee, the period provided by the statute in which the proceedings may be commenced for the enforcement of the lien, expiring during the pendency of the suit.”

It was held in these cases'that the section should be construed as though it provided that the lien should not continue unless proceedings were commenced in the proper court “against the person or persons against whose interest the lieno is asserted,” and hence, where a mortgagee of property was not made a party to the suit to enforce the mechanic’s lien, he was not bound by the judgment, nor was the lien, after the expiration of the statutory period, of any effect as against the mortgagee’s interest.

We are satisfied that the construction placed upon the statute by the federal courts is sound. We refer to the eases themselves for the reason upon which the construction of the statute is based. The following eases from other jurisdictions support the rule above stated: Davis v. Bartz, 65 Wash. 395, 118 Pac. 334; Smith v. Hurd, 50 Minn. 503, 36 Am. St. 661, 52 N. W. 922; Hokanson v. Gunderson, 54 Minn. 499, 40 Am. St. 354, 56 N. W. 172; Martin v. Berry, 159 Ind. 566, 64 N. E. 912; Stoermer v. People’s Sav. Bank, 152 Ind. 104, 52 N. E. 606; Union Nat. Sav. & Loan Assn. v. Halberg, 152 Ind. 139, 51 N. E. 916; Green v. Sanford, 34 Neb. 363, 51 N. W. 967; Falconer v. Cochran, 68 Minn. 405, 71 N. W. 386 ; Badger Lumber Co. v. Staley, 141 Mo. App. 595, 125 S. W. 779; Dunphy v. Riddle, 86 Ill. 22; McGraw v. Bayard, 96 Ill. 146; Ballard v. Thompson, 40 Neb. 529, 58 N. W. 1133; Bitter v. Mouat Lmbr. & Inv. Co., 10 Colo. App. 307, 51 Pac. 519.

In this case, the mortgage was duly recorded, so that no question of secret equities is involved. As against the mortgage lien, the lien for material furnished, if any existed, is lost because the action to foreclose the same was not commenced within the time limited by the statute.

The limitation prescribed by statute of the time within which an action must be brought in a proper court for the foreclosure of a mechanic’s lien is not the ordinary statute of limitation which is waived if not pleaded. “The time within which a suit must be brought operates as a limitation of the liability itself as created, and not of the remedy alone. It is a condition attached to the right to sue at all.” (The Harrisburg v. Rickards, 119 U. S. 199, 7 Sup. Ct. 140, 30 L. ed. 358. See, also, Continental etc. Bank v. Pacific Coast Pipe Co., supra.)

The judgment is reversed and the cause remanded, with instructions to the district court to enter a decree foreclosing appellant’s mortgage and adjudging it to be a prior lien to that of respondent for the material furnished. Costs awarded to appellant.

Morgan, C. J., and Budge, J., concur.  