
108 Cal.App.2d 14 (1951)
BARR LUMBER COMPANY (a Corporation), Appellant,
v.
EARL A. SHAFFER et al., Respondents.
Civ. No. 4200. 
California Court of Appeals. Fourth Dist.  
Dec. 4, 1951.
 Forgy, Reinhaus & Forgy for Appellant.
 C. Arthur Nisson, Jr., Harvey, Rimel & Johnston and Wellington and Sprague for Respondents.
 O'Melveny & Myers, Louis W. Myers and Pierce Works, Amicus Curiae on behalf of California Land Title Association. *15
 GRIFFIN, J.
 Plaintiff and appellant Barr Lumber Company, a corporation, brought this action against defendants to foreclose a mechanic's or materialman's lien for $2,590.60, for materials furnished and used in constructing a house being built by defendants Earl and Ann Shaffer. Plaintiff alleged in its second amended complaint that the Shaffers were the owners of a parcel of land in Orange County containing about 4.89 acres; that about February 9, 1948, defendants William C. Labahn and wife, and defendants Charles A. Rockwell and wife, loaned $12,000 to the Shaffers and that as security for said loan the Shaffers executed a note and trust deed dated February 9, 1948, and recorded May 14, 1948, in that amount covering the real property described; that under the deed of trust the real property was conveyed to defendant Reliance Title Company, a corporation, as trustee. The lenders were named as beneficiaries thereunder. It is further alleged that at the time the loan was made there was no dwelling house on the real property; that thereafter about September 1, 1948, defendant Mr. Shaffer, with the knowledge and consent of the remaining defendants, commenced building thereon; that between September 24, 1948, and October 29, 1948 (which period was prior to its completion), at the request of defendant Mr. Shaffer, plaintiff furnished him material to be used in the construction of the building, and that a mechanic's lien was duly recorded. It is then alleged that the construction of the dwelling house was commenced and completed after the real property was conveyed to the trustee, and that after its completion the value of the entire property was approximately $18,000; that on September 1, 1949, the trustee conveyed the property to defendants C. A. Nisson and wife (purchasers of the property) following a foreclosure sale of it under the trust deed for the sum of $10,700. By the amended complaint plaintiff seeks judgment against each defendant for $2,590 damages and costs. In a second cause of action it is alleged that it would be grossly unjust and inequitable for these defendants to retain this property without payment to plaintiff of the reasonable value of said materials used in the construction of the improvements, and plaintiff seeks the right to the establishment of a lien against the dwelling house in that sum and asks that it be adjudged a superior or prior lien to the trust deed, and that the building be sold and the proceeds be applied in payment of plaintiff's claim. Defendants Nisson filed a motion to strike the whole of the second amended complaint and also certain paragraphs thereof as containing irrelevant *16 and redundant matter, and also filed a general demurrer claiming that the amended complaint stated no cause of action against these defendants, and asked that the demurrer be sustained without leave to amend. A similar demurrer and motion to strike was filed by the other defendant, Reliance Title Company, as trustee, as well as the defendants Rockwell and Labahn. The motions to strike were granted and the demurrers were sustained without leave to amend. Judgment was entered in favor of these demurring defendants. The court decreed that plaintiff take nothing by this action as against them. Plaintiff appealed from the judgment.
 [1a] The principal question presented on this appeal is whether or not the charge or lien of a trust deed, mortgage or other encumbrance recorded prior to the commencement of the work of improvement is superior to the lien upon the improvement (as distinguished from the land) of a mechanic or materialman for work done or materials furnished in connection with such work.
 It is appellant's theory of the law of mechanics' liens in California that laborers and materialmen are entitled to compensation; that to secure payment to those furnishing labor and materials such persons are granted an implied right to proceed against a structure for which labor and materials have been furnished; and that therefore a mechanic's lien may exist upon a building for which labor and materials have been furnished and that a lien upon the structure is not incompatable with the prior encumbrance upon the land itself. In support of the argument appellant cites article XX, section 15, Constitution of California, which states:
 "Mechanics, material men, artisans, and laborers of every class, shall have a lien upon the property upon which they have bestowed labor or furnished material for the value of such labor done and material furnished; and the legislature shall provide, by law, for the speedy and efficient enforcement of such liens."
 Appellant claims that this provision of the Constitution gives a direct lien upon the property to which persons have furnished labor or material, and that in providing for the enforcement of such liens under the constitutional mandate, the Legislature adopted about the same provisions in section 1183 of the Code of Civil Procedure; that this section provides only for a lien upon the property into which labor and materials have gone, and does not give a lien upon the land; that this interpretation is given force by the adoption of section 1185 *17 of the Code of Civil Procedure, which provides for a lien upon the land in addition to a lien upon the building to the extent of the contracting owners' interest, citing McDowell v. Perry, 9 Cal.App.2d 555, at 564 [51 P.2d 117]. It is further argued that to distinguish between the ownership of improvements made on land and the ownership of the real property itself, the Legislature enacted section 1192 of the Code of Civil Procedure which provides that a landowner may protect his interest in land as distinguished from the building by giving a notice of nonresponsibility. Secondly, it is argued that the mechanic's lien upon the building or structure is a primary thing and that the land is merely incident to it and that a prior recorded encumbrance, mortgage, or trust deed upon the land itself is junior to a mechanic's lien accruing from work or materials supplied to an improvement commenced subsequent to the date of recordation, citing such cases as Bottomly v. Rector, Wardens & Vestry of Grace Church, 2 Cal. 90; Houghton v. Blake, 5 Cal. 240; Holmes v. Richet, 56 Cal. 307 [38 Am.Rep. 54]; McGreary v. Osborne, 9 Cal. 119; Humboldt Lbr. Mill Co. v. Crisp, 146 Cal. 686 [81 P. 30, 106 Am.St.Rep. 75, 2 Ann.Cas. 811]; Linck v. Meikeljohn, 2 Cal.App. 506 [84 P. 309]; Western Elec. Co. v. Colley, 79 Cal.App. 770 [251 P. 331]; English v. Olympic Auditorium, Inc., 217 Cal. 631 [20 P.2d 946, 87 A.L.R. 1281]; and 22 Cal.L.Rev. 312.
 As to the first contention respondents have no particular quarrel with appellant's theory as applied to the interests of the owner, particularly where the transaction resulted in an unjust enrichment to such owner. The English case and the Linck case sufficiently dispose of this question. As to the second point, respondents, as well as counsel for amicus curiae California Land Title Association, most earnestly disagree.
 Respondents cite Basham v. Goodholm & Sparrow Inv. Co., 52 Okla. 536 [152 P. 416], where the court held a mechanic's lien inferior to the lien of a recorded mortgage and then said:
 "... there are many states which permit materialmen and mechanics, who furnish material and labor to improve land upon which there is a prior recorded mortgage, to obtain a lien on the improvements so constructed superior to the mortgage lien, but such priority operates only upon the improvements, the mortgage holder still retaining his priority as to the land; but, as this rule contravenes the common law, it cannot be done in the absence of an expressed statute which plainly authorizes it. It will be noted that statutes that authorize it are clear and explicit, and leave nothing to conjecture." (Citing *18 the Statute of Texas (Sayles Supp. Rev. St. art. 3171. See, also, Stats. of Iowa, subd. 4,  3317 McClain's Code.)
 In Kentucky Lbr. & Mill Work Co. v. Kentucky Title Sav. Bank & T. Co., 184 Ky. 244 [211 S.W. 765, 5 A.L.R. 391], at p. 769 [211 S.W.], the court said:
 "The contention of appellants that the Bank & Trust Company's mortgage does not attach to the house, because it was not in existence when the mortgage was executed, cannot be sustained. Where a lien is created upon land, and buildings are thereafter erected upon it, the lien attaches to the buildings, as they are constructed, and has priority over the liens of materialmen and laborers for constructing the buildings. (Citing cases.) In the absence of a statute to that effect, a prior lien cannot be restricted to the land itself, when a building is thereafter erected upon it. ..."
 It is apparent that the constitutional and statutory provisions for mechanics' liens in the State of California did not, as in the states referred to, specifically provide that mechanics' liens shall be superior to a mortgage lien or deed of trust previously recorded. It was stated in McGreary v. Osborne, 9 Cal. 119, at page 122, that "The object of the act was to give the mechanic a lien upon whatever interest the person had who caused the superstructure to be made." (Italics ours.) To the same effect is Allis-Chalmers Co. v. Central Trust Co., 190 F. 700, 704 [111 C.C.A. 428, 39 L.R.A.N.S. 84], where it is said:
 "One who contracts with the owner of land to furnish labor and materials, ... is assumed to know, if a mortgage is recorded, that the consent of the mortgagor as owner can give a lien only to the extent of the mortgagor's interest. ... He has no reasonable ground for an expectation or belief that a mortgagee who has advanced money upon the security of the land or on the improvements to be made thereon is willing to forego this security even if the money is advanced for the purpose of placing improvements upon the land."
 "... Whoever undertakes construction work upon property subject to a recorded mortgage must be assumed to have relied upon the personal responsibility of the other party to the contract and upon such liens as the statute grants in definite terms, and not upon the expectation of displacing the priority of mortgage liens. ..."
 Counsel for amicus curiae points out that his research reveals that no courts of California have held a prior recorded encumbrance upon land to be junior in any respect to a *19 mechanic's lien arising from work or materials supplied to an improvement commenced subsequent to the date of recordation.
 In Rose v. Munie (1854), 4 Cal. 173, the Supreme Court said:
 "It is useless for us to adduce any argument in support of the proposition that a mortgage of land carries with it all buildings which are or may be attached to the freehold, and that the rights of the mortgagee cannot be defeated by mechanics' liens, or other incumbrances created without his consent."
 American Building M. S. Co. v. Wallin, 116 Cal.App. 527, 529 [2 P.2d 1007], is a case factually similar. The court there held that a trust deed is a lien or encumbrance within the meaning of section 1186, supra, and that the general rule is that if recorded before any work is done or materials are commenced to be furnished, a deed of trust or mortgage is in the ordinary course of things prior to mechanics' liens.
 This general rule relating to mortgages is stated in 18 California Jurisprudence 110, section 417, where it is said:
 "A mortgage of real property includes not only the land, but improvements subsequently made thereon, the lien upon which is ordinarily construed to relate back to the date of the mortgage, and is entitled to priority as against a mortgage subsequent to the construction of the improvements. ..."
 The only limited qualification there mentioned referred to the former mechanics' lien act which was then in effect. (Stats. 1850, ch. 87, pp. 211, 213,  9), which gave mechanics' liens preference over encumbrances attaching subsequent to the time work was commenced.
 In Preston v. Sonora Lodge, 39 Cal. 116, 118, the court held that under the Statutes of 1867-1868, page 589, section 3, prior encumbrances were superior as to permanent mining claim improvements, and stated as a general proposition of law buildings and structures placed upon mortgaged premises became part of such premises and are impressed with the lien of the mortgage, but did also state such lien was inferior as to structures subsequently built upon the property which were capable of removal and of separate sale.
 The entire question then resolves itself to the question of the priority of a lien as between the holder of a prior recorded encumbrance and the lien of the materialman. The present governing statute, enacted in 1872, is section 1186 of the Code *20 of Civil Procedure which, at the time this complaint was filed, read:
 "Priority of Liens. The liens provided for in this chapter are preferred to any lien, mortgage, deed of trust, or other encumbrance, upon the premises and improvements to which the liens provided for in this chapter attach, which may have attached subsequent to the time when the building, improvement, structure, or work of improvement in connection with which the lien claimant has done his work or furnished his material, was commenced; also to any lien, mortgage, deed of trust, or other encumbrance of which the lienholder had no notice, and which was unrecorded at the time the building, improvement, structure or work improvement with which the lien claimant has done his work or furnished his material was commenced."
 That section does not provide that a mechanic's lien is superior to a prior recorded encumbrance but provides that mechanics' and materialmen's liens are only preferred as to (1) mortgages, trust deeds, and other encumbrances attaching subsequent to the time the improvement was commenced; and (2) unrecorded mortgages, trust deeds, and such other encumbrances of which the lien claimant had no notice. To be construed in connection with section 1186 of the Code of Civil Procedure is section 2897 of the Civil Code, which has been in effect for a like period. It recites:
 "Priority of Liens. Other things being equal, different liens upon the same property have priority according to the time of their creation. ..." (Italics ours.)
 In Ferger v. Gearhart, 44 Cal.App. 245 [186 P. 376], Article XX California Constitution, section 15 was held not to be self-executing, and that it was inoperative except as supplemented by the Legislature through its power reasonably to regulate and to provide for the exercise of the right, the manner of its exercise, the time when it attached, and the time within which and the persons against whom it could be enforced. The Legislature has exercised its plenary power in this respect continuously from 1850 down to the present time. (Peckham v. Fox, 1 Cal.App. 307 [82 P. 91].)
 In Smith v. Anglo-California Trust Co., 205 Cal. 496 [271 P. 898], the rule is restated that where a mortgage or deed of trust has been recorded prior to the commencement of work or the furnishing of materials, but the consideration therefor has not passed until after work has commenced or materials have been furnished, the lien of the mortgage or *21 deed of trust is prior and superior to the mechanics' lien claims where the making of the advances is obligatory on the part of the mortgagee or the beneficiary, citing cases.
 Appellant claims that the right to a mechanic's and materialman's lien was raised to the dignity of a constitutional right by the Constitution of 1879, and argues that by reason of the decision in the English case and the interpretation placed upon it in 22 California Law Review, page 312, the previous opinions of the several courts have been altered to this extent and that "so far as mechanics are concerned" the building built upon the land "does not become a fixture until all mechanics' lien claimants are paid." It is true that there is language in the English case, page 643, as quoted. We find no legislative enactment supporting this statement, particularly, as applied to prior recorded encumbrances. There, the court was considering a lease, by the terms of which the building did not become the property of the owner of the land until the termination of the lease. (See, also, footnote No. 8, in 22 California Law Review, page 313, commenting on this statement and suggesting that the proper view would be that the building does become part of the lessor's land, but subject to the lien of the mechanic, whose right cannot be defeated by any provisions to the contrary in the lease, citing Linck v. Meikeljohn, supra.) It is true that this language was used in construing the relationship of the parties predicated upon the lease involved and on the theory, as mentioned in the opinion, that since the lease contemplated the construction of a building which would enhance the value of the fee to the benefit of the lessor, the lessee must be deemed a statutory agent of the lessor for the purpose of the construction. It is clear from that case and the decision therein that no previous trust deed was involved; that no mortgage lien existed on the property or building and that the mechanics' liens were allowed upon the theory that the lessee was the statutory agent of the lessor for the purpose of the construction. No such facts here exist.
 In San Pedro Lbr. Co. v. Wilson, 4 Cal.App.2d 41 [40 P.2d 605] (hearing denied by the Supreme Court) which decision was written after the English case, this court held that a prior recorded mortgage or deed of trust creates a lien superior to the subsequent lien of a materialman, citing cases. In that case a mortgage and deed of trust were placed upon certain property and were duly recorded. Thereafter, the property was leased to a third party who went into possession *22 and erected a house upon it. Plaintiff was not paid for the materials it furnished, and filed a materialman's lien. An action was commenced to foreclose the lien. The trial court there held that the liens of the mortgage and deed of trust were prior to the materialman's lien. Personal judgment was rendered against the third party for the amount of the claim. Plaintiff's lien was ordered foreclosed subject to the mortgage and deed of trust. There plaintiff relied upon the decision in English v. Olympic Auditorium, Inc., supra, to support its contention that the materialman's lien was superior to that of the mortgage. This court there held that the English case was readily distinguishable from the instant case in this, that in the English case no question of the priority of a lien of a prior mortgage or deed of trust was involved and for that reason it was not controlling. The lower court's judgment was affirmed.
 In Linck v. Meikeljohn, supra, no question of a prior lien was involved. That case was distinguished in Brush v. E. R. Bohan & Co., 102 Cal.App. 457 [283 P. 126], where the reasoning which underlies both section 1186 of the Code of Civil Procedure and section 2897 of the Civil Code was discussed.
 Appellant also cites Miller v. Waddingham, 91 Cal. 377, 381 [27 P. 750, 13 L.R.A. 680]; Estate of Reid, 26 Cal.App.2d 362 [79 P.2d 451]; and American Transit Mix Co. v. Weber, 106 Cal.App.2d 74 [234 P.2d 732], which latter case involved a vendor-vendee relationship. In that case no vendor's lien existed until the deed was given, which was at a time subsequent to the time when the materialman's lien attached. (Allen v. Wilson, 178 Cal. 674 [174 P. 661]; Oaks v. Kendall, 23 Cal.App.2d 715 [73 P.2d 1255].)
 [2] It is amicus curiae's position in this action on appeal that the principles advocated by it with regard to the priority of earlier recorded mortgages and trust deeds over mechanics' liens have been the settled law of this state for one hundred years; that they have become a rule of property; that millions upon millions of dollars have been lent upon the security of California real property, bolstered by the knowledge of the public that recordation meant priority from that day forward as against any subsequent private lien or charge upon the land; that as regards mechanics' liens, section 1186, supra has so provided since 1872; that since the Legislature has failed specifically to declare that such mechanics' liens are prior in point of time to a previously recorded trust deed or encumbrance, the courts should construe the statutes in *23 accordance with the time honored construction that has been given to those statutes over this period of time.
 As pointed out by counsel for amicus curiae, attorneys have doubtless advised their clients upon the law as announced in this long line of decisions, property rights have been acquired upon the faith of those decisions, and upon the interpretation of the statutes now before us. We conclude that if there were any good reason for a change in the rule with reference to trust deeds the Legislature had abundant opportunity for an unequivocal declaration of such change. We find no statute that has been enacted with a view to the alteration of the declared doctrine.
 In Sontag v. Springer, 37 Cal.App.2d 663, 665 [99 P.2d 1098], this court said:
 "It has been repeatedly held that where a conclusion reached in a decision has been settled by long acquiescence on the part of the legislature and the courts, it will ordinarily not be disturbed, even if its soundness is doubted."
 [1b] It therefore appears that the trust deed here involved, having been recorded prior to the commencement of work, was prior to the lien here claimed and the necessary result would be that the title to the property passed to the appellants Nisson under the trustee's foreclosure sale free and clear of the lien involved.
 [3] Lastly, it is argued that a motion to strike is not the proper method of attacking a pleading claimed to be insufficient to state a cause of action, and the trial court erred in granting the motion to strike, particularly prior to sustaining the demurrers without leave to amend. We see no merit in this complaint because if the motion to strike had not been granted the demurrers as to both counts of the complaint would necessarily have had to be sustained without leave to amend. (Neal v. Bank of America, 93 Cal.App.2d 678 [209 P.2d 825]; Bowen v. Aubrey, 22 Cal. 566.)
 [4] It is appellant's argument that the second cause of action was for equitable relief; that although it repleaded all the allegations of the first cause of action, it added certain allegations concerning the value of the property before and after the building was erected, to show unjust enrichment on the part of the owners of the land; that defendants were aware of the construction of said dwelling house and that the loan was not made for the purpose of financing the construction of a dwelling house; that all of these allegations *24 were made for the purpose of stating a cause of action for equitable relief; and that accordingly the demurrer to that cause of action should not have been sustained without leave to amend, citing Times-Mirror Co. v. Superior Court, 3 Cal.2d 309, 331 [44 P.2d 547]; and Wuest v. Wuest, 53 Cal.App.2d 339 [127 P.2d 934].
 The facts pleaded in plaintiff's first cause of action clearly show that a trust deed was executed, delivered and recorded on the dates indicated; that shortly thereafter a house was built on the property. It further shows that so far as the Rockwells and the Labahns are concerned, they, in good faith, did advance the sum of $12,000 to the Shaffers for the apparent purpose of constructing a home upon the property. The allegations further show that as far as defendants Nisson were concerned they were innocent purchasers for value at the foreclosure sale under the trust deed. Therefore, it does not appear that the mechanic's lien claimant has an equity greater than the holders of the trust deed or the purchasers at the public foreclosure sale made pursuant to law. If the property had been improved in value to the extent alleged, the lien claimant might well have protected his interest by purchasing it at the same sale. The demurrers to the amended complaint were properly sustained without leave to amend.
 Judgment affirmed.
 Barnard, P. J., and Mussell, J., concurred.
