
    Argued April 7,
    reversed and remanded June 24,
    petition for rehearing denied July 20, 1976
    OAK GROVE PARR, INC., Appellant, v. McCUTCHEON CONSTRUCTION CO. et al, Respondents.
    
    550 P2d 1382
    
      James K. Belknap, Portland, argued the cause and filed briefs for appellant.
    
      
      Jarvis B. Black, of Phillips, Coughlin, Buell, Stoloff & Black, Portland, argued the cause and filed a brief for respondents.
    BRYSON, J.
   BRYSON, J.

Plaintiff brought this suit to foreclose a mechanic’s lien for materials furnished. Defendants James and Lilli Buell demurred to plaintiff’s complaint on the ground the complaint failed to state a cause of action. The trial court, before trial, issued an order allowing the Buells’ demurrer and denied plaintiff’s motion for leave to file an amended complaint. From this order plaintiff appeals.

Plaintiff first contends the trial court erred in allowing the demurrer. The complaint alleges that plaintiff filed its lien claim for materials in proper form, containing all statutory requirements, as evidenced by a copy of the duly recorded notice of lien. This copy, "Exhibit A,” is made a part of the complaint and shows that the lien notice was filed by "The Parr Company, Inc.,” not the plaintiff, Oak Grove Parr, Inc.

Plaintiff contends that the recital in "Exhibit A,” rather than the caption of the complaint, should control because the "notice of lien is 'the very foundation of the pleading,’ ” citing Andersen v. Turpin, 172 Or 420, 425-27, 142 P2d 999 (1943). In Andersen the complaint alleged that plaintiff, lienor, contracted with and employed the defendants to do the work for which he claimed the lien. The notice of lien, made a part of the complaint, stated that the plaintiff performed the work "at the instance and request of J. N. Richardson,” and that "Richardson was the contractor and agent of the defendants.” The court held:

"The allegation of the notice of lien, that the contract was entered into between defendants’ contractor and plaintiff, is not necessarily at variance with the allegation of the complaint, that it was entered into between defendants and plaintiff. Under the statute relating to liens of mechanics, the contractor in charge of the construction is made the agent of the owner. * * *” 172 Or at 427-28.

Unlike the situation in Andersen, in the instant case the lien notice was filed by "The Parr Company, Inc.,” and the complaint was brought by Oak Grove Parr, Inc.

If there is a discrepancy between the averments of a pleading and the terms of a writing attached as an exhibit and made a part of the pleadings, the language of the exhibit will control in determining the legal effect, but an exhibit made a part of the pleadings, as in the instant case, cannot serve the purpose of supplying the necessary and material averments that were missing in plaintiff’s complaint. Anderson et al v. Chambliss et ux (lien foreclosure), 199 Or 400, 409, 262 P2d 298 (1953); Lemire v. McCollum, 246 Or 418, 427, 425 P2d 755 (1967). It is clear from the complaint that plaintiff did not bring itself within the terms of the mechanic’s lien law, and the court did not err in allowing the demurrer.

The more difficult question raised by plaintiff is whether the court erred in denying its motion for leave to amend its complaint by correctly designating "The Parr Company, Inc.” in the caption as the party-plaintiff. ORS 16.390 provides:

"The court may, at any time before trial, in furtherance of justice, and upon such terms as may be proper, allow any pleading or proceeding to be amended by adding the name of a party, or other allegation material to the cause; and in like manner and for like reasons may, at any time before the cause is submitted, allow such pleading or proceeding to be amended, by striking out the name of any party, or by correcting a mistake in the name of a party, or a mistake in any other respect, * * * »

The remedy afforded by this statute is to be liberally administered in furtherance of justice. Morrill v. Rountree, 242 Or 320, 325, 408 P2d 932 (1966); York v. Nash, 42 Or 321, 326-27, 71 P 59 (1903). In Wells v. Davis, 258 Or 93, 95, 480 P2d 699 (1971), we stated:

"* * * The trial court has the discretion before trial to allow an amendment substantially changing the cause of action. ORS 16.390. Zimmerle v. Childers, 67 Or 465, 470, 136 P 349 (1913).”

In the instant case, the trial court was of the opinion that it had no authority to allow the proposed amendment because the amendment seeks to substitute "The Parr Company, Inc.,” as plaintiff.

In Hume v. Kelly, 28 Or 398, 406-09, 43 P 380 (1896), we held that a court may permit such a substitution if there is no prejudice to the defendant and no material change in the substance of the complaint.

«* * * we think, when there is an appearance to the action, and the defendant tests the right of the named plaintiff to maintain the action by a demurrer, and the latter is sustained, the name of the proper parties plaintiff may be substituted in the action by an amended petition, subject of course to * * * the right of the defendants to a continuance if taken by surprise. If this is not the rule, the action must abate * * *. This, under the statute [the predecessor to ORS 16.390], should not be the rule unless substantial justice so demands. * * *” 28 Or at 408. (Emphasis added.)

We note from the trial file that before filing their demurrer defendants Buell made an appearance pursuant to ORS 87.020 and requested that plaintiff furnish a statement of all materials, prices claimed, credits allowed, and copies of all billings or invoices in connection with the improvements described in plaintiffs complaint.

In State ex rel v. Downing, 40 Or 309, 322-24, 58 P 863, 66 P 917 (1901), and York v. Nash, supra at 325-28, we held that the trial court properly allowed an amendment which changed the name of the party-plaintiff before trial. These decisions were followed in Sandgren et al v. Cain Lumber Co., et al, 125 Or 375, 377, 264 P 865 (1928), and Hall v. Cutler Bindery Co., 145 Or 565, 572, 26 P2d 1109 (1934).

The trial court had the authority to consider the amendment.

"As a general rule where statutes authorize amendments substituting plaintiffs, such amendments are to be allowed liberally for the purpose of accomplishing the object of the statutes. And while it is said that the allowance of amendments is within the discretion of the court to which the application is made, it has been held an abuse of discretion to refuse to amend by substituting a plaintiff where the real cause of action is not changed and the statute of limitations has expired so that the substituted plaintiff could not bring an original action. Where the denial of a motion to substitute was made on the erroneous supposition that there was no right to substitute, the refusal to permit such a substitution will not be sustained as the exercise of discretion.” Annot., 135 ALR 325, 329-30. (Emphasis added; footnotes omitted.)

A trial court, before trial, is authorized under ORS 16.390 to allow a substitution of a party-plaintiff "in furtherance of justice.” We conclude that the trial court did not properly exercise its discretion, and plaintiff should be allowed to file an amended complaint.

Reversed and remanded for further proceedings. 
      
      Defendant McCutcheon Construction Co., an alleged owner of the subject real property, is a named defendant but made no appearance in this proceeding.
     
      
      For a discussion of divergent authorities regarding the propriety of substituting parties-plaintiff, see generally Orkin Exterminating Company v. O’Hanlon, 243 NC 457, 91 SE2d 222, 226-28 (1956); Annot., 135 ALR 325 (1941); 59 Am Jur 2d, Parties §§ 216, 220.
     