Corson, P. J.
This is an appeal from an order overruling a demurrer to the complaint. The complaint, a synopsis of which only will be given, alleges that in October, 1886, the defendant Froelick made to the defendant Miller, as payee, his promissory note for $1,650, payable five years from its date, and attached to which were 10 interest coupons, and secured the same by a trust deed on real property in Kingsbury county, and in which trust deed defendant Hole was named as trustee; that, very soon after its execution, the said note was transferred by said Miller, together with his interest in the trust deed to the plaintiff; that the 10 coupons attached to said note for the payment of interest were paid at their maturity, but that the principal of said note is due and unpaid, with interest from October, 1891; that in 1893 the said Hole, the trustee named in said trust deed foreclosed the same by advertisement, and that the defendant the Valley Land & Irrigation Company at said Hole’s request, bid in the property described in said trust deed at the sale for the sum of $3,68.096, but that said Valley Land & Irrigation Company has not paid any part of said sum so bid, though it has received a certificate from the sheriff therefor; that said Valley Land & Irrigation Company refuses to transfer to the plaintiff the certificate of sale made to it by the said sheriff, unless she will assume and pay about $800, claimed to have been paid by said Hole, trustee, as interest in taking up the coupons on plaintiff’s note, and about $300 taxes, which said Hole as trustee claims to have paid upon the property for the years 1886 to 1891, inclusive, that said Hole has taken inMs.oym. Paines fax certificate of said property included in said *355trust deed, and now holds the same, and refuses to transfer the same to the plaintiff. She further alleges that she had no knowledge or information that said Bole was paying the interest and taxes upon said property, but supposed that the same were being paid by said Froelick, the maker of said note and grantor in said trust deed; that she has resided since 1886 in the state of Pennsylvania, and that her place of residence, and the fact that she was the owner of said note, were well known to said Hole during all of said time, but that neither he nor any other person informed the plaintiff that said interest and taxes were not being promptly paid by the said Froelick, and that, had she been so informed, she would have foreclosed at once her trust deed, in accordance with its terms; that plaintiff was not informed of said foreclosure sale until after the same had been-made, and that she did not authorize the said Valley Land & Irrigation Company, nor any other party, to bid the same in for her, or for her benefit; that said property does not exceed the value of $2,200; and that the amount due plaintiff for principal and interest on her said note exceeds $1,800. The complaint concludes with a prayer for judgment against the Valley Land & Irrigation Company and said Hole for the amount due her, and that said property be decreed to be sold to pay the same; that the treasurer of Kingsbury county be perpetually enjoined from issuing a tax deed to said Hole, etc., with the usual prayer for such other relief, etc. To this complaint the defendants Hole, Miller, and the Valley Land & Irrigation Company demurred, upon the following grounds: “First, that said complaint does not state facts sufficient to constitute a cause of action;' second, several causes of action have been improperly united, to wit, for the foreclosure of a mortgage and a cause of action to set aside the foreclosure of a mortgage;' and, third, an action to determine adverse interests in real estate; and, fourth, an action to set aside tax deeds and tax sale certificates upon the property described in the plaintiff’s complaint; and, fifth, an action for the recovery of money only upon contract.
*356The learned counsel for the appellants and respondent argued the case oarlly, and filed printed briefs, in which they have discussed the questions presented by the demurrer very fully; but, in the view we take of the case, it will not be necessary to review or discuss many of the authorities cited, as the demurrer must be determined by the provisions of our own Code. If the complaint states more than one cause of action, we think they are properly joined as causes of action arising out of “the same transaction or transactions connected with the same subject of action.” Subdivision 1, § 4632, Comp. Laws. Neither text writers nor judges have been able to define with accuracy the meaning of this subdivision, but they all agree that its object is to adopt as a rule, in actions under the code system, the rule formerly prevailing in equity proceedings. Mr. Bliss, in his work on Code Pleading, says: “But not only under this class may all causes of action that arise out of the same transaction be united in one proceeding, but also those that arise from different transactions, provided they are connected with the same subject of action; * * * and this is, ordinarily, the property or the contract and its subject-matter or other thing involved in the dispute.” Bliss, Code PI. § 126. Mr. Bay lies, in his work on Code Pleading, says: “The clause in question was introduced by an amendment of the old Code of (New York) 1852, which is substantially re-enacted in the present Code, and was, doubtless, intended to remedy the defect, and to apply to equitable actions, which frequently'embrace many complicated acts and transactions relating to the subject-matter of the action, which it would be desirable to settle in a single action.” Baylies, Code PI. p. 117. Mr. Pomeroy, in his treatise on Remedies and' Remedial Rights, says; “The class which is described by the language of the Codes quoted in the above heading is broad, comprehensive, vague, and uncertain. The principal design was, undoubtedly, to embrace the vast mass of equitable actions and causes of action which coplff not he classified and arranged in any more definite man*357ner; and the language was properly left vague, so that it might not in any manner interfere with the settled doctrines of equitable procedure and pleadings, parties, and remedies.” Pom. Rem. & Rem. Rights, § 463, and, after á lengthy discussion of the subject, he says that, in his view, “subject of action” means subject-matter of the action;” and he concludes as follows: “I can conceive of no other interpretation which will apply to the phrase and meet all the requirements of the context. ‘Subject-matter of the action’ is not the ‘cause of action,’ nor the ‘object of the action. ’ It rather describes the physical facts, the things, real or personal, the money, lands, chattels, and the like, in relation to which the suit is prosecuted. It is possible therefore, that several different ‘transactions’ should have a connection with this ‘subject of action.’ The whole passage is, at best, a difficult one to construe in such a manner that any explicit and definite rule can be extracted from it. I remark, ip bringing this analysis of the language to a close, that the latter clause of the subdivision, ‘or transactions connected with the same subject of action,■’ can probably have no application to legal causes of action, and can only be resorted 'to in practice as describing some equitable suits which involve extremely complicated matters. In fact, Mr. Justice Comstock’s position is • doubtless correct, that the entire subdivision finds its primary and by far most important application to equitable, rather than to legal, proceedings. ” Id., § 475.
It seems clear, in the case at bar, that all the matters set out it the complaint are connected with the same subject of action, and that the transactions of the trustee and Valley Land & Irrigation Company alleged arise opt of or are connected with, the ‘¡subject of the action,” namely, the note and trust deed. It is apparent from the facts alleged in the complaint, and which are admitted by the demurrer, that the plaintiff was the owner of the note executed by Froelick to Miller, and which was secured by the trust deed executed to Hole as trustee; that'Hole, as trustee, allowed the interest to accumu*358late for a number of years, so far as the defendant Froelick was concerned, by paying it himself, instead of collecting it from Froelick; and that he had allowed the taxes to accumulate so far as Froelick was concerned, by paying them himself, without notifying the plaintiff of the nonpayment of such interest and taxes; and that he foreclosed the mortgage or trust deed without her knowledge or consent, and caused the property to be bid in by the Valley Land & Irrigation Company for a sum largely in excess of the value of the property, for his own benefit; and that the Valley Land & Irrigation Company now refuses, by the direction of said trustee, to surrender to the plaintiff the certificate to which she is entitled, unless she consents to pay about $1,100, which the trustee claims to be due him for such interest and taxes paid by him. If, as is claimed by coun- • sel for the respondent, it was the duty of the trustee, upon .the failure of Froelick to pay the interest and taxes when due, to have notified the plaintiff of such failure, that she might have taken such proceedings as she was authorized to take by the terms of the trust deed, and he failed in the performance of that duty, by paying such interest and taxes himself, and with which he now seeks to charge her, and requires her to pay, before she can avail herself of the attempted foreclosure, she is entitled to relief in some form, and has a good cause of action, to which the trustee and the Valley Land & Irrigation Company are properly parties, as they are, by their acts preventing the plaintiff from making available her security.
The law does not favor a multiplicty of actions, and when all the matters in controversy can properly be settled in the same action, as they clearly may be in. this action, it is proper that they should be so settled in one action. The action is one in equity, and is, in effect, for the foreclosure of the trust deed. All persons, therefore, claiming an interest in, or lien upon, the property subsequent to the execution of the trust deed, are proper parties, and their claims, liens and equities should be, and are properly, determinable in this action. Whether or not *359the prayer for relief is strictly the proper one is not necessary now to be determined, as a demurrer does not reach the prayer of the complaint. ‘An improper demand for relief does not render the complaint demurrable.” Maxw. Code Pl. p. 9; Bliss Code Pl. § 417; Hudson v. Archer, 4 S. D. 128, 55 N. W. 1099. Under the general prayer, where the defendants have appeared in the action, the court may grant any “relief consistent with the case made by the complaint, and embraced within the issue.” Comp. Laws, § 5097.
We are of the opinion that the demurrer was properly overruled, and the order overruling the same is affirmed, and the case is remanded to the circuit court for further proceedings.