Upon a former appeal in this action (Hibernia etc. Soc. v. Thornton, 109 Cal. 427; 50 Am. St. *482Rep. 52), the judgment was reversed upon the ground that it appeared from the findings that the promissory note upon which the action was brought had been, at the time of its execution, secured by a mortgage upon real property, and that by reason of the provisions in section 726 of the Code of Civil Procedure, the makers were not liable to an action upon the note independent of a suit to foreclose the mortgage. When the cause again came on for trial in the superior court, the defendant moved for judgment upon the pleadings, upon the ground that the complaint does not state facts sufficient to constitute a cause of action. The court granted the motion, and rendered judgment in favor of the defendant, reciting therein: “It appearing from said complaint that the promissory note set forth in the complaint is secured by mortgage, and that said complaint does not ask for or pray that the mortgaged property be sold and the proceeds applied to the costs of said action, expenses of sale, and to the payment of the promissory note sued upon in this action, as provided by section 726 of the Code of Civil Procedure of the state of California,” etc. From this judgment the plaintiff has appealed.
The right of a defendant to move for judgment upon the pleadings, when the complaint fails to state a cause of action, is well settled in this state. (King v. Montgomery, 50 Cal. 115; Kelly v. Kriess, 68 Cal. 210; DeToro v. Robinson, 91 Cal. 371.) Upon such motion, however, the court cannot consider any matter outside of the complaint, or any defense thereto in the answer, but the motion is to be determined upon the same principles as would be a demurrer to the complaint upon the same ground. All the facts alleged in the complaint are admitted for the purposes of the motion, and the court is to determine whether these facts constitute a cause of action. If the necessary facts are contained in the complaint, the objection that they are defectively set forth, or are in an ambiguous or uncertain form, will be unavailing. There must be an *483entire absence of some fact or facts essential to constituting a cause of action.
The complaint in the present action contains the ordinary allegations in an action upon a promissory note. It alleges the making of the note by the defendant and his wife, setting forth a copy thereof, the demand for its payment after maturity, that no part of it has been paid, and prays for judgment. The defendant, however, contends that by reason of the clause at the end of the promissory note, viz: “This note secured by a mortgage of even date herewith,” it appears from the complaint that the note was secured by a mortgage, and therefore the complaint fails to show a right to maintain a separate action upon the note. There is, however, no averment in the complaint that the note was secured by a mortgage, and the recital to that effect in the note cannot, as matter of pleading, be treated as the equivalent of such averment. It is only by inference or argument from this recital that it can be assumed that a mortgage was ever executed, and the rule is as much in force under the code as at common law that argumentative pleading is not permissible. “Matters of substance must be alleged in direct terms and not by way of recital or reference, much less by exhibits merely attached to the pleading. Whatever is an essential element to a cause of action must be presented by a distinct averment, and cannot be left to an inference to be drawn from the construction of a document attached to the complaint” (Burkett v. Griffith, 90 Cal. 532; 25 Am. St. Rep. 151); and for the purposes of pleading the rule is the same, whether the instrument is set forth by copy in the body of the complaint or is attached thereto as an exhibit. The defendant might have demurred to the complaint on the ground that it was doubtful or uncertain therefrom whether in fact the note was secured by a mortgage, but, in the absence of such demurrer, the complaint was sufficient to sustain a judgment by default for the amount of the note. In the answer the defendant has *484set forth affirmatively that the note was secured by a mortgage, but, as we have seen, this allegation could not be considered in determining the matter. Neither were the matters shown at the former trial or upon the appeal available in support of the motion, since the reversal of the judgment was by reason of the facts found by the court upon the trial of the cause.
This motion for judgment on the pleadings was made in the absence of the plaintiff’s counsel, but the grounds upon which it was to be determined were not changed by this fact. The plaintiff afterward moved to set aside the judgment, on the ground of excusable neglect, but its motion was denied, and it has also appealed from that order. As the reversal of the judgment has the effect to give to the plaintiff the relief sought by that motion, it is unnecessary to consider the merits of the motion upon this appeal.
The judgment and order appealed from are reversed.
Garoutte, J., and Van Fleet, J., concurred.
Hearing in Bank denied.