
    [Civ. No. 16368.
    First Dist., Div. Two.
    Sept. 12, 1955.]
    HARRY ATHERLEY, Plaintiff, v. MacDONALD, YOUNG & NELSON, INC. (a Corporation) et al., Appellants; PETER J. FEYKERT, Respondent.
    
      Hadsell, Murman & Bishop for Appellants.
    Bronson, Bronson & McKinnon for Respondent.
   DOOLING, J.

Appellants and respondent were joined as eodefendants in an action for personal injuries received by the plaintiff, Atherley, in a fall on a steel stairway under construction. Appellants filed a cross-complaint against their codefendant the respondent, alleging that respondent had agreed to construct the stairway on which the plaintiff fell and had agreed to hold appellants harmless from any liability caused by the act, omission or negligence of respondent. The cross-complaint asked for a declaratory judgment establishing the rights and liabilities of the parties under this contract.

Respondent objects to the consideration of the appeal court made its order granting the motion to strike the cross-complaint and sustaining the demurrer to it without leave to amend. , From this order appellants have taken this appeal. Pending the appeal the main action was tried resulting in a judgment for plaintiff against appellants herein and a judgment in favor of respondent herein. The judgment in favor of respondent has become final, but an appeal is pending from the judgment for plaintiff against appellants.

Respondent objects to the consideration of the appeal on the ground that no judgment was entered on the order sustaining demurrer, invoking the settled rule that no appeal lies from an order sustaining a demurrer. (Berri v. Superior Court, 43 Cal.2d 856 [279 P.2d 8].) Under the form of the order here the question becomes academic. The written order of the court reads: “. . . it is hereby ordered, adjudged, and decreed that said motion to strike said amended (cross) complaint is granted and said demurrer to said amended (cross) complaint is sustained without leave to amend.”

Where one defendant’s cross-complaint is aimed at another defendant an order striking it is treated as a final judgment from which the cross-complainant may appeal. (Howe v. Key System Transit Co., 198 Cal. 525 [246 P. 39] ; People v. Buellton Dev. Co., 58 Cal.App.2d 178 [136 P.2d 793]; County of Humboldt v. Kay, 57 Cal.App.2d 115 [134 P.2d 501].) The order in this case falls squarely within this rule.

Respondent also argues that by reason of the judgment since entered on the complaint of Atherley this appeal has become moot. His argument in this respect is twofold.

1. The judgment in his favor exonerates him of responsibility for plaintiff’s injuries and is therefore conclusive on appellants that the condition of his liability on the “hold-harmless” agreement does not exist. We need not determine whether this construction of the “hold-harmless” agreement is correct because in no event is a judgment in an action in which the parties were not adversaries, but only joined as codefendants, res judicata as between them in a later proceeding. (Standard Oil Co. v. J. P. Mills Organ ization, 3 Cal.2d 128, 139-141 [43 P.2d 797]; Victor Oil Co. v. Drum, 184 Cal. 226, 239 [193 P. 243]; Robson v. Superior Court, 171 Cal. 588, 595 [154 P. 8]; County of Los Angeles v. Continental Corp., 113 Cal.App.2d 207, 222-223 [248 P.2d 157] ; City of San Diego v. California Water & Tel. Co., 71 Cal.App.2d 261, 276 [162 P.2d 684]; Hardy v. Rosenthal, 2 Cal.App.2d 442, 446 [38 P.2d 412] ; Tanaka v. Highway Farming Co., 76 Cal.App. 590, 594 [245 P. 434] ; Hubermann v. National Surety Co., 37 Cal.App. 569 [174 P. 79]; Code Civ. Proc., § 1910.) If respondent had permitted appellants’ cross-eomplaint to go to trial then, of course, the parties would have occupied the adversary position necessary to make the judgment res judicata between them.

2. Since the entry of judgment on the complaint, respondent argues, there is no action pending in which the cross-complaint can be maintained. A complaint and cross-complaint for most purposes are treated as independent actions (see 2 Witkin, California Procedure, p. 1580) and the cross-complainant is not deprived of the right to the trial of the issues on his cross-complaint by a judgment dismissing the complaint. (Tomales Bay etc. Corp. v. Superior Court, 35 Cal.2d 389 [217 P.2d 968] ; Pacific Finance Corp. v. Superior Court, 219 Cal. 179 [25 P.2d 983, 90 A.L.R. 384].) By analogy the fact that the main ease has gone to judgment after trial should not under the circumstances here present deprive appellants of their right, if such exists, to a trial of the issues tendered by their cross-complaint.

On the merits of the case appellants’ right to file their cross-complaint depends upon the proper construction of Code of Civil Procedure, section 442:

“Whenever the defendant seeks affirmative relief against any party, relating to or depending upon the contract, transaction, matter, happening or accident upon which the action is brought, or affecting the property to which the action relates, he may, in addition to his answer, file at the same time, or by permission of the court subsequently, a cross-complaint. ’ ’

If the main action were on contract the decided cases in this state would compel the holding that one defendant is entitled to file a cross-complaint against a codefendant upon a contract to indemnify him against the liability sought to be enforced by the plaintiff. The rule with the cases supporting it was thus stated in Television Arts Prod. v. J. Fairbanks, Inc., 134 Cal.App.2d 293, at p. 297 [285 P.2d 695] : “Where several persons' are sued upon a demand, against which one defendant has agreed to indemnify another, the latter may have his rights to indemnity determined by means of a cross-complaint. It was so held in Eastin v. Roberts, Carpenter & Co., 19 Cal.App.2d 567 [66 P.2d 224]; County of Humboldt v. Kay, 57 Cal.App.2d 115 [134 P.2d 501] ; Sattinger v. Newbauer, 123 Cal.App.2d 365 [266 P.2d 586].”

The fact that in onr case the main action is in tort while in the cases cited above it was in contract does not in our opinion furnish any sound distinction between the cases. The “transaction” clause of section 442 is at least as broad in its language as the “transaction” clause of section 427, subdivision 8, Code of Civil Procedure, which permits the joinder in one action of “(c)laims arising out of the same transaction.” This has been construed to permit the joinder of an action in tort and an action against one who by contract has assumed a direct liability for such tort. (Kane v. Mendenhall, 5 Cal.2d 749, 753 [56 P.2d 498] ; Grier v. Ferrant, 62 Cal.App.2d 306, 313 [144 P.2d 631].) If a contract to be liable for another’s tort is a “claim arising out of the same transaction” as the tort within the meaning of section 427, subdivision 8, then a contract to save another harmless from liability for a tort must relate to or depend upon the transaction out of which the tort liability arises within the meaning of section 442.

Respondent relies upon Linder v. Russian Health Baths, 131 Cal.App.2d 621 [281 P.2d 314]. In that ease defendant attempted to bring in a new party as cross-defendant. We said at page 622: “When a party plaintiff is not a party to an agreement between some of the defendants and a stranger to the action the controversy between the latter two parties cannot be made the subject of a cross-complaint in the main action.” (Emphasis ours.) The emphasized words indicate the distinction between that case and this. The provisions of section 442, Code of Civil Procedure, apply only to parties to the action. As between such parties a cross-complaint may be filed by a defendant who “seeks affirmative relief . . . relating to or depending upon the . . . transaction . . . upon which the action is brought ...” But to bring in a new party, a stranger to the action, by cross-complaint the cross-complainant must satisfy the provisions of section 389, Code of Civil Procedure, and must show, quoting section 389, that “a complete determination of the controversy cannot be had without the presence of other parties.” The court made the distinction clear in the leading case of Alpers v. Bliss, 145 Cal. 565 at pages 570-571 [79 P. 171]. “Thus the test for a cross-complaint against a new party is more stringent than that governing cross-claims against the plaintiff or codefendants. Under Code of Civil Procedure, section 389, the .stranger must be a party necessary to a complete determination of the controversy between the original parties.” (2 Witkin, California Procedure, p. 1587; emphasis the author’s.)

The claim that this cross-complaint for declaratory relief did not state a cause of action is answered by County of Humboldt v. Kay, supra, 57 Cal.App.2d 115 and Sattinger v. Newbauer, supra, 123 Cal.App.2d 365, wherein the courts held cross-complaints asking for declaratory relief proper under analogous circumstances.

Judgment reversed.

Nourse, P. J., and Kaufman, J., concurred.

A petition for a rehearing was denied October 11, 1955, and respondent’s petition for a hearing by the Supreme Court was denied November 9, 1955.  