This case, like
Tate
v.
Supe7'ior Court, ante,
at page 238 [
The facts, as alleged in the petition filed here, are admitted by the return. On June 9, 1958, Elmer L. Perrel commenced an action in the respondent superior court to recover damages for bodily injuries. At the time of his injury, Perrel was employed by Bay View Welding Works to make repairs on a large metal storage tank owned by Vegetable Oil Products Company, Inc. Perrel’s original complaint for damages named as defendants Safway Steel Scaffolds, Vegetable Oil Products Company, Inc., and Bay View Welding Works. A general demurrer interposed by Bay View was sustained on August 1, 1958, and Perrel thereafter filed an amended complaint omitting that party. The action was tried and judgment entered for defendants. On appeal, the Supreme Court reversed and remanded for a new trial against the defendant Vegetable Oil only.
(Ferrel
v.
Safway Steel Scaffolds,
The remittitur was filed in the superior court on June 18, 1962. On July 6, 1962, Vegetable Oil filed a motion *255 for leave to amend its answer to allege an additional affirmative defense as follows: that at the time of Ferrel’s injury he was acting in the course and scope of his employment as an employee of Bay View; that Bay View had procured workmen’s compensation insurance with Casualty Insurance Company; that said compensation carrier had paid benefits to Ferrel and claims a lien on any recovery by Fer-rel; that Ferrel’s injury was caused by the negligence of Bay View, and that Bay View and its compensation carrier are therefore barred from recovery of anything.
The motion further asked leave to file a cross-complaint and join Bay View and Casualty Insurance Company as cross-defendants.
On October 3, 1962, the court made an order denying this motion in all respects. The order further provided that “If it should be determined in any appellate proceeding” that the cross-complaint be filed and the new parties joined, “then this Court under Code of Civil Procedure section 1048 orders all proceedings upon said cross-complaint be severed, for separate trial.”
Vegetable Oil then petitioned this court for a writ o.f mandamus to compel the granting of its motion.
The opinion filed this day in
Tate
v.
Superior Court, ante,
at page 238 [
Respondent makes the additional argument here that the dismissal of Bay View after the demurrer was sustained to the original complaint constitutes an adjudication that Bay View was not at fault. The allegations of the original complaint have not been made a part of the record here, but nothing before this court now would indicate that there was any such adjudication. The most obvious probable reason for the dismissal of Bay View is that the complaint showed that Bay View was plaintiff’s employer, and Labor Code, section 3601, bars any such action against the employer by an employee who is entitled to the benefits of the
*256
compensation act. A judgment in an action in which the parties were not adversaries, but only joined as co-defendants, is not res judicata as between them.
(Atherley
v.
MacDonald, Young & Nelson,
The cross-complaint proposed by Vegetable Oil involves issues not raised in the
Tate
proceeding. It is in two separate causes of action. One is for declaratory relief against Bay View’s compensation carrier, Casualty Insurance Company, asking a declaration that the carrier is not entitled to recover back any benefits paid to Ferrel, and that Ferrel’s recovery, if any, against Vegetable Oil must be reduced by the amount of the compensation benefits. This is the type of cross-complaint which was held to be proper in
City of Sacramento
v.
Superior Court,
The other cause of action of the proposed cross-complaint is directed against Bay View. Therein Vegetable Oil, as cross-complainant, alleges that when it engaged Bay View to repair the storage tank, the latter agreed to perform the work in a careful and prudent manner; that Bay View had the exclusive control and supervision over the work; that Ferrel’s accident was caused by Bay View’s negligence ; and that Bay View has an implied duty to indemnify Vegetable Oil against any claim for damage or expense resulting from Bay View's failure to provide for the safety of the workmen. The prayer is for a declaration that Bay View is obligated to pay any judgment, costs, attorney’s fees and expenses incurred by Vegetable Oil in the action brought against it by Ferrel.
The allegations state a cause of action for indemnification under the principles discussed in
San Francisco Unified School Dist.
v.
California Bldg. etc. Co.,
Although the cross-complainant’s cause of action grows out of events which occurred and rights which were fixed on the date of the accident (June 11, 1957), the cross-complaint is not barred by any statute of limitations.
De La Forest
v.
Yandle,
If it were the law that the statute of limitations starts to run when the bodily injury occurs, the indemnitee’s remedy would be most unsatisfactory. Until the amount of the damages was determined by a judgment or a compromise with the injured party, the indemnitor would have no way of either measuring or discharging his duty to his indemnitee. The only workable approach is that applied in the De La Forest case—that the period of limitations starts to run from payment.
Effective September 18, 1959, the Legislature added to the chapter of the Labor Code on workmen’s compensation “subrogation,” a new section 3864 which reads:
“If an action as provided in this chapter prosecuted by the employee, the employer, or both jointly against the third person results in judgment against such third person, or settlement by such third person, the employer shall have no liability to reimburse or hold such third person harmless on such judgment or settlement in absence of a written agreement so to do executed prior to the injury.”
The liability which Vegetable Oil seeks to establish by its cross-complaint appears to be the kind referred to in the 1959 statute. Although the proposed cross-complaint refers to a “written letter and order” which are “attached and made a part hereof,” no such attachment is included in the papers brought before this court. The proposed cross-complaint alleges “an implied duty to indemnify,” and *258 petitioner does not argue that its cross-complaint is based upon any written agreement to hold harmless. Rather, petitioner is contending that its rights accrued before section 3864 became effective, and hence cannot be cut off by the new legislation.
American Can Co.
v.
City & County of San Francisco,
This case involves legal relationships which were established when Perrel was injured on June 11, 1957. Under the law as it existed on that date, as applied to the facts alleged in the pleadings, Perrel had a claim against his employer for benefits under the Workmen’s Compensation Act; Perrel had a right to recover damages from Vegetable Oil; and Vegetable Oil had a right to be indemnified by the employer. The effect of section 3864, if applicable here, is to cut off Vegetable Oil’s valuable right to go against Bay View.
In
California Emp. etc. Com.
v.
Payne,
This is not inconsistent with the reasoning or the decision in
Augustus
v.
Bean,
*259 “Our construction of section 880 [Code Civ. Proc.] does not give rise to a problem of retroactive impairment of a vested right. As of the time of the accident a person did not have a vested right at common law to avoid paying for the consequences of his negligence merely because there were other tortfeasors involved. After the entry of a judgment against the joint tortfeasors, each of them was liable in full until the judgment was satisfied, and, if the plaintiff chose to collect from one to the exclusion of another, this was a matter of chance rather than the result of a right which became fixed as of the time of the accident. Contribution statutes, if applied where an accident antedates their enactment, do not retroactively increase the liability existing at the time of the injury but merely provide a method by which the liability of each of the tortfeasors may be limited to his pro rata share of the judgment.” (56 Cal.2d at p. 272 .)
In the present case (unlike the Augustus case) Vegetable Oil had a right to shift the entire loss upon the tortfeasor who had created the dangerous condition. This was based upon then existing principles of substantive law, and not upon any fortuitous choice made by the injured party. In a situation such as is presented by this cross-complaint the policy of the law, in 1957, was not to treat the employer and the third party equally (as in the conventional case of joint tortfeasors) but to place the ultimate burden entirely upon one of them. The 1959 statute reversed this policy, leaving a substantial part of the loss with the third party by taking away his right of indemnification.
Petitioner complains also that the respondent court made an order that if it be determined in any appellate proceedings that the cross-complaint might be filed, then all proceedings on the cross-complaint shall be severed for separate trial. This type of order is within the trial court’s discretion under Code of Civil Procedure, section 1048. (See
Roylance
v.
Dodger,
Let a peremptory writ of mandamus issue to require the respondent court to modify its order of October 3, 1962, so as to grant the motion of petitioner for leave to amend its answer and so as to grant the motion for leave to file a cross-complaint against Bay View. In other respects the petition is denied.
Shinn, P. J., and Ford, J., concurred.
