delivered the opinion of the court.
The facts set out in the petition, and amended petition, are substantially these: That the plaintiffs, Warder, Brokaw, and Child, were the makers and owners of a mowing machine sold to the defendant, English; that Tucker was the agent for the sale of the machines, and the plaintiff, Dean, together with several of his neighbors, desiring to purchase one, he, (Dean,) at the instance of English, contracted with said agent for several of the machines to be sent to the neighborhood, at the price of $115 each, with freight and charges for transportation, amounting to $4 80; that under this arrangement the machine sold to the defendant was sent to Dean, who delivered it to English, informing him, at the time, of the facts and terms upon which they were sold, to which the latter agreed, and received the machine on those terms; that Dean, having ordered and received this machine, and being, under the circumstances stated, bound for the price, paid it to his co-plaintiffs, the makers and owners, according to the terms of the contract, and the plaintiffs pray judgment therefor against the defendant.
The defendant demurred to the petition, specifying the following grounds of objection:
“First. Because the petition sets out no joint ‘ interest in no cause of action common to the plain- ‘ tiffs.
■1. One whole legally bound for a debt by 'parol undertaking, united with the creditor towhom he had made ■payment, in an action -by ordinary peti tion against another who had received-the benefit of the contractwlth the creditor.— Held, upon demurrer -to the petition, that -the pi’fía were entitled to>judgment.“Second. Because the petition shows that the firm ‘ of Warder & Co., the vendors of the machine * charged to have been sold to defendant, have been ‘ satisfied as to their demand, and consequently have ‘ no demand or claim against the defendant.
“ Third. Because, as to plaintiff Dean, the petition ‘ shows no cause of action against defendant, in his 1 favor.”
The circuit court sustained the demurrer, and the plaintiffs’ appeal from that decision presents but the single inquiry, whether, upon the facts stated in the petition, (which must upon the demurrer, be taken as true,) the plaintiffs, or either-of them, were entitled to recover against the defendant?
Dean, having contracted with the manufacturers for the purchase of this machine, and it having been delivered to him according to the terms of their contract, was clearly bound to them for its value. His co-plaintiffs had the light to look to him, as well as to the defendant, for payment. Dean paid the debt, as he was bound to do, and the effect of such payment was to transfer to and invest him with all the rights of his co-plaintiffs as against the defendant. But whether bound or not—aud conceding that his payment was merely voluntary—the liability of the defendant was not thereby discharged. He is, in either aspect of the case, unquestionably bound either to the manufacturers or to Dean for the price of the machine he has received, and upon either hypothesis they were all properly joined as plaintiffs in the action.
The second ground of objection to the petition is, that Warder & Co., the vendors of the machine, had been satisfied as to their demand, and that consequently they have no further claim against the defendant. This objection of course assumes that Dean was bound to them for the debt, and that the payment by him was a discharge of his obligation to them, as well as of their claim against the defendant. It results, therefore, as before intimated, that *136Dean became the equitable assignee of the claim of Warder & Co., and thereby acquired a right of action, upon that claim, against the defendant. But, under the Civil Code, (section 31,) he could not maintain the action in his own name, without making the firm of Warder &. Co. defendants, or unless they united with him as plaintiffs. This rule of practice, so far from prejudicing the rights of the defendant, is absolutely necessary to his protection, enabling him to set up any matter of defense he may have against all or any of the parties, and securing him against the assertion, by either, of any future claim connected with or arising out of the transaction.
2. A demurrer is available m a suit by ordinary tbereis a^defect °h parJj,es’ not those joined who are not necessary parties as plaintiffs or decase^hTrulofs to move to stnke out such as are unneeessarily or improperly joined. (Civil Code, sec. 31, and sec. 120, and sub sec. 4.)Besides, it may be remarked that under the Civil Code (section 120, sub-section 4,) a defect of parties— , , „ , . ' J * plaintiff or defendant—is a valid ground of demurrer> the objection that the petition shows a misJ°inc^er °f parties, either plaintiffs or defendants, can 011 ^ be taken advantage of by a motion to strike out the name of the party thus improperly r J c 1 J joined.
We are satisfied that neither of the objections to the petition, relied upon by the appellee, are maintain- ,, ,,, J , , , , , able, and that tne demurrer should have been overruled.
Wherefore, the judgment is reversed and the cause remanded for further proceedings in conformity with this opinion.