
112 Cal.App.2d 593 (1952)
KARL FREEDMAN et al., Respondents,
v.
IMPERIAL CATTLE COMPANY (a Corporation) et al., Appellants.
Civ. No. 18941. 
California Court of Appeals. Second Dist., Div. Three.  
Aug. 7, 1952.
 Hunter & Liljestrom for Appellants.
 Joseph Schecter for Respondents.
 VALLEE, J.
 Appeal from an order denying the motion of defendants Imperial Cattle Company, a corporation, and Adolph Weinberg, for an order changing the place of trial of the action from Los Angeles County to Imperial County.
 The principal office of Imperial Cattle Company is in Imperial County. Weinberg is a resident of Los Angeles County. The remaining defendants reside outside Los Angeles County. The question is whether there is any substantial evidence to support the implied finding of the court that Weinberg is a necessary party defendant.
 The action is for damages for personal injuries sustained in Imperial County. Epitomized, the complaint, which is treated as an affidavit for the purposes of the motion, alleges that: defendants maintained a building and premises in Imperial County in which they conducted a cattle and grain business; on the premises they maintained a screw conveyor in a pit; the pit was covered with loose, unsecured boards which had slippery grain lodged beneath them; some of the boards were defective; the conveyor was "unguarded"; safety orders of the Department of Industrial Relations require that "screw conveyors and pits and surrounding areas" be protected with guard rails, toe boards, wire mesh, and other *595 safety devices; the screw conveyor and pit were in the exclusive control of defendants; defendants negligently allowed the area about and over the pit and the opening of the screw conveyor "to become in a state of disrepair" so that it did not adequately cover and safeguard the screw conveyor and pit; on July 30, 1951, plaintiff Karl Freedman, an invitee, at the direction of defendants, parked his truck over the screw conveyor and pit to load some sacks in the area; by reason of the negligent manner in which the screw conveyor and pit were covered plaintiff was precipitated into the pit causing severe injuries.
 Two affidavits of Weinberg were filed in support of the motion. They state: he is vice president and a stockholder of defendant Imperial Cattle Company; on the day of the accident he was not in Imperial County; he has no interest in or possession of any of the property of the corporation other than as a stockholder; he did not at the time of the accident or prior thereto have any part in the management or operation of the business of the corporation; he has no knowledge of the condition of the conveyor on July 30, 1951, or at any time prior thereto; "he has no knowledge of any dangerous condition existing in connection with said conveyor"; he has no knowledge of any hazard to plaintiff either on the date of the accident or prior thereto; "he knows nothing whatever about the operation of such conveyor, or similar type of equipment, and states that he has not seen such conveyor, or similar type of equipment, more than two or three times in his lifetime."
 In opposition to the motion plaintiffs filed three affidavits made by their attorney. They state that after the complaint was filed the attorney had a telephone conversation with Weinberg in which Weinberg told him "that he had gone to Imperial County two or three years ago in 1948 or 1949 and had purchased the land, premises and the moving conveyor involved herein from the R. W. Morrison Estate in Imperial County. That as far as he knew, the land, premises and conveyor were in the same state at the time of purchase as they were on July 30, 1951, the date of Mr. Freedman's accident. That Mr. Weinberg was not in Imperial County on July 30, 1951, and knew nothing personally about the accident." One of the affidavits further states: "that the defendant Weinberg has been in the cattle and grain business for many years and knows that conveyors in the condition of the one involved herein are dangerous. That the hazard *596 here was a constant and continuing one from the day that defendant Weinberg purchased the land and conveyor in 1949 until several weeks beyond July 30, 1951, when the conveyor was covered with steel wire mesh"; and that "the present Imperial Cattle Co., defendant herein, was purchased by the Imperial Land and Cattle Company, a copartnership, consisting of Adolph Weinberg, Etta Weinberg, Stafford Hannon and Fluvia Hannon, on or about November 25, 1949, from R. W. Morrison Estate, in Imperial County."
 [1] The residence of defendant corporation is Imperial County, the county in which its principal office is located. (6A Cal.Jur. 272,  140.) If Weinberg is not a necessary party to the action his joinder as a defendant cannot defeat defendant corporation's right to have the action tried in the county of its residence. (White v. Kaiser-Frazer Corp., 100 Cal.App.2d 754, 758 [224 P.2d 833].) [2] "Where both resident and nonresident defendants are necessary parties, a change of venue will not be granted upon demand of the nonresident defendant. (Freeman v. Dowling, 219 Cal. 213, 217 [25 P.2d 980].) [3] 'The test is to be made by ascertaining who are necessary parties to the action as it is set forth in the complaint, and what parties are necessary in order to enable the plaintiffs to obtain all the relief which is properly included in the prayer for relief made therein.' (Freeman v. Dowling, supra, p. 217. Italics added.) [4] In determining a motion for a change of venue, the court must accept as true the material allegations of the complaint which are not controverted. (Peterson v. Sherman, 68 Cal.App.2d 706, 711 [157 P.2d 863]; Lachman Co. v. Central Cal. Berry Growers' Assn., 58 Cal.App. 748, 752 [209 P. 379].) [5, 6] The verified complaint is an affidavit or evidence proper to be considered in opposition to the motion (Goes v. Perry, 18 Cal.2d 373, 378 [115 P.2d 441]; Atwater v. Argonne Van & Storage Co., 74 Cal.App.2d 410, 412 [168 P.2d 776]), and, on appeal from an order denying a motion for a change, is deemed to establish all facts therein stated and which reasonably may be inferred from those stated. (Brainard v. Brainard, 82 Cal.App.2d 478, 480 [186 P.2d 990].) [7] Upon a motion for change of venue, the court should not try disputed issues of fact going to the merits of the cause, upon the conflicting affidavits, in order to determine whether or not a cause of action does in reality exist against the resident defendant. (California Collection Agency v. Fontana, 61 Cal.App.2d 648, 653 [143 P.2d 507].) *597 [8] The real issue for determination of the trial court was whether plaintiff, in joining the resident party as a defendant, had reasonable grounds for the belief that he had a cause of action against the resident defendant. (California Collection Agency v. Fontana, 61 Cal.App.2d 648, 653 [143 P.2d 507].) " (White v. Kaiser-Frazer Corp., 100 Cal.App.2d 754, 758 [224 P.2d 833].)
 [9] The question in the present case was one of fact for the trial court. In the absence of an abuse of discretion, we cannot disturb its determination. [10] The court could reasonably have concluded from the complaint and the affidavits filed in opposition to the motion, and the inferences that may be drawn therefrom, that; the screw conveyor is a dangerous instrumentality; Weinberg has been in the cattle and grain business for many years; he, with others in a partnership, purchased the property, including the conveyor, in November, 1949; he is charged with knowledge of the safety orders of the Department of Industrial Relations which require that screw conveyors and pits be protected with guard rails and other safety devices; he knew that a screw conveyor in the condition of the one which caused the injuries is dangerous; the premises, conveyor, and pit were in the same condition at the time of the accident as they were at the time he purchased them and they were not protected as required; Weinberg, as an officer of the corporation, knew the condition of the conveyor and pit and permitted them to remain in that condition; an ordinary prudent person should have anticipated that danger to others was likely to occur from a screw conveyor and pit which were not protected as required by the safety orders.
 Applying the test stated above, the trial judge was warranted in concluding that Weinberg is a necessary party defendant to enable plaintiffs to obtain all the relief which they seek; and that in joining him as a defendant, plaintiffs had reasonable grounds for the belief that they had a cause of action against the resident defendant.
 Affirmed.
 Shinn, P. J., and Wood (Parker), J., concurred.
