
97 Cal.App.2d 78 (1950)
CHARLES NELSON, Petitioner,
v.
THE SUPERIOR COURT OF LOS ANGELES COUNTY, Respondent.
Civ. No. 17690. 
California Court of Appeals. Second Dist., Div. One.  
Apr. 20, 1950.
 Goldman & Chaitkin for Petitioner.
 Harold W. Kennedy, County Counsel, and Wm. E. Lamoreaux, Deputy County Counsel, for Respondent.
 DRAPEAU, J.
 The third amended complaint alleges that plaintiff is assignee of a claim of Sonelco, a corporation, against defendants; that defendants assigned to Sonelco an account with Hansen; and that, notwithstanding the assignment of the account, defendants collected moneys from Hansen and kept them for themselves, with a balance of $3,143.49 due from defendants to plaintiff as assignee.
 [1a] Defendant Charles Nelson moved to file a cross-complaint with the following allegations: That he and his son were partners and organized the Sonelco corporation to continue *79 the partnership business; that it was agreed between the corporation and defendant that defendant would be the exclusive distributor and agent for the corporation's products in the southern half, approximately, of the State of California; that Sonelco repudiated this agreement after the death of defendant's son and control of the corporation passed to other hands; that because of this repudiation defendant lost money on a number of contracts he had made for the sale of Sonelco's products, and that Sonelco, after repudiating the contract, invaded defendant's territory. For all of which defendant demands judgment against Sonelco for $27,395.36.
 The superior court denied defendant's motion to file the cross-complaint, and defendant petitions this court for a writ of mandate, requiring the superior court to file the same. In effect this would add Sonelco as a party cross-defendant, and enlarge the issues to be tried.
 The ruling of the trial court was undoubtedly made because of the statement of counsel for defendant that the cross-complaint did not involve the same contract. (See Code Civ. Proc.,  442.) Defendant contends that while it does not involve the same contract it does involve the same transaction; that the assignment of the Hansen contract to Sonelco, and the later collection of the money due from Hansen to Sonelco was a part of the larger transaction involving defendant's distributor status with the corporation, and the breach of defendant's contract with Sonelco.
 The word "transaction" as used under the facts in this case has a broad and comprehensive meaning. (California Trust Co. v. Cohn, 214 Cal. 619 [7 P.2d 297].)
 The provisions of the code respecting cross-complaints and counterclaims are to be interpreted liberally. (Thorpe v. Story, 10 Cal.2d 104 [73 P.2d 1194].)
 The averments in the proposed cross-complaint have to do with the transaction, a part of which is involved in the action, and the defendant has the right to file his cross-complaint and bring in the corporate defendant.
 [2] The assignee for the purpose of the suit is an agent of the assignor. (Elam v. Arzaga, 122 Cal.App. 742 [10 P.2d 805].)
 [1b] In the return and answer to the petition for writ of mandate, it is suggested that mandamus does not lie in any event, because the writ is not available to correct errors in the ordinary course of judicial proceedings. Under the circumstances in this case, it is the duty of the trial court, unmixed *80 with discretion, to permit the cross- complaint to be filed and to bring in the additional party defendant. Thus the rights of all of the parties to the whole transaction will be determined. (16 Cal.Jur.,  33, p. 819 et seq.)
 [3] Mandamus is to be used to compel a court to give a full hearing to the case before it, not as to how it should rule with respect to the merits of the case. (Sampsell v. Superior Court, 32 Cal.2d 763 [197 P.2d 739].)
 Let a peremptory writ of mandate issue as prayed.
 White, P. J., and Doran, J., concurred.
