
26 Cal.2d 809 (1945)
DONALD MacISAAC et al., Respondents,
v.
EMILE A. POZZO et al., Appellants.
L. A. No. 18991. 
Supreme Court of California. In Bank.  
Aug. 10, 1945.
 H. G. Redwine and Gwyn S. Redwine for Appellants.
 A. L. Abrahams and Henry B. Ely for Respondents.
 GIBSON, C.J.
 Defendants have appealed from a judgment on the pleadings in an action brought by plaintiffs for declaratory relief.
 The complaint alleged that the parties entered into a *811 joint venture agreement for the construction of a civilian housing project, the profits to be divided equally between the parties; that a month or so later they entered into a second joint venture agreement which provided that certain facilities of the original joint venture should be used in the performance of a job for the Utah Fuel Company, profits to be divided 85 per cent to plaintiffs and 15 per cent to defendants; that partial payments made on account of the Utah Fuel job were divided on the 85%-15% basis; that defendants have prevented the Utah Fuel Company from settling the amount of the balance owing to plaintiffs and defendants until the respective rights of plaintiffs and defendants therein have been determined; that an actual controversy exists relating to the legal rights and duties of plaintiffs and defendants and to their respective rights in and to the moneys heretofore paid and still unpaid under their contract with the Utah Fuel Company; that it is the contention of defendants that the second joint venture agreement is invalid and not enforceable and that they are entitled to receive one-half of all moneys heretofore paid and which may hereafter be paid pursuant to the terms of the contract of the parties with the Utah Fuel Company; that it is the contention of plaintiffs that the second joint venture agreement is an enforceable contract and that plaintiffs are entitled to receive 85 per cent and defendants 15 per cent of the moneys heretofore collected and still due from Utah Fuel Company. Plaintiffs prayed that the court make a declaration of the respective rights and duties of plaintiffs and defendants and determine the validity of the second joint venture agreement.
 Defendants filed an answer which alleged that the Utah Fuel job was negotiated by agents who were acting on behalf of the original joint venture, and whose compensation, traveling and other expenses were paid by that venture, that plaintiffs fraudulently represented that they had obtained the Utah Fuel job by reason of a recommendation from the Kaiser Company, but would allow defendants 15 per cent of the profits if they would permit the original joint venture facilities to be used, otherwise plaintiffs would take the job and defendants would have no interest therein; that defendants were induced to execute the second joint venture agreement by plaintiffs' fraud and by their concealment of the *812 fact that the Utah Fuel job had been negotiated for and obtained by agents of the original joint venture; that before any money was collected defendants informed plaintiffs that they were entitled to and expected to receive 50 per cent of the profits, and that when the job was completed they expected that such an adjustment would be made; that the second joint venture agreement is invalid because of the circumstances surrounding its execution; and that defendants are entitled to receive one-half of all moneys heretofore paid or which may be paid hereafter by the Utah Fuel Company.
 The defendants also filed a cross-complaint which, after restating the facts pleaded in the answer, alleged that the original joint venture agreement was executed under an oral understanding that the parties would contract for other work; that, if the second joint venture agreement is not set aside plaintiffs will by their fraud and concealment become unjustly enriched at the defendants' expense; that certain costs and expenses of the Utah Fuel job had been paid from funds of the original venture and not repaid; and that plaintiffs had received $4,300 from the original venture as purported compensation for performing the Utah Fuel job. The prayer of the cross-complaint was for the difference between what defendants had received and 50 per cent of the moneys already paid under the Utah Fuel contract, for a declaration that defendants were entitled to 50 per cent of all further payments to be made thereunder, for an order requiring plaintiffs to repay $4,300 to the original joint venture, for a full and complete accounting, and for such other and further relief as defendants might be entitled to in the premises.
 When the case came on for trial, plaintiffs moved for judgment on the pleadings on the ground that the cross-complaint did not state any cause of action against plaintiffs, and that the answer to the complaint raised no issue of law whatever. The motion was granted. The defendants requested leave to amend their answer to conform with the trial court's expressed opinion regarding the pleadings, but the request was denied. No demurrer was filed to defendants' pleadings, and no notice had been given of the intention to move for judgment on the pleadings.
 [1] A motion by plaintiff for judgment on the pleadings is in the nature of a general demurrer, and the motion must be denied if the defendant's pleadings raise a material issue *813 or set up affirmative matter constituting a defense. (Cohn v. Klein, 209 Cal. 421, 424 [287 P. 459]; Cass v. Rochester, 174 Cal. 358, 360 [163 P. 212]; Neale v. Morrow, 174 Cal. 49, 54 [161 P. 1165].) [2] For the purpose of ruling on the motion, the trial court must treat all of defendant's allegations as being true, and since the moving party admits the untruth of his own allegations in so far as they have been controverted, all such averments must be disregarded whether there is a direct and specific denial or an indirect denial by virtue of affirmative allegations of a contrary state of facts.
 [3] It clearly appears from the pleadings that the parties were joint venturers under the original agreement and this relationship existed when the Utah Fuel contract and the second joint venture agreement were executed. They therefore occupied a fiduciary relationship similar in many respects to that of partners, and each owed to the other the duty of highest loyalty and utmost good faith, being charged not to take any unfair advantage or secret profit. (Universal Sales Corp. v. California Press Mfg. Co., 20 Cal.2d 751, 772 [128 P.2d 665]; Richards v. Fraser, 122 Cal. 456 [55 P. 246]; Ford & McNamara, Inc. v. Wilson, 199 Cal.App. 475 [6 P.2d 996]; Menefee v. Oxnam, 42 Cal.App. 81 [183 P. 379]; see, also, Zeibak v. Nasser, 12 Cal.2d 1, 12 [82 P.2d 375].) Hence if, as alleged, the Utah Fuel contract was obtained by agents of the original joint venture who were acting in its behalf and for its benefit, defendants were entitled to an equal share in the benefits of that contract, and if they were induced by plaintiffs' fraud and concealment to execute an agreement for a lesser share, they were entitled to relief upon discovering the fraud.
 [4] Plaintiffs argue, however, that a contract induced by fraud is enforceable unless rescinded; that defendants did not seek rescission or establish a right thereto; that they have neither alleged nor asked for damages; and, therefore, that the court properly declared the second joint venture agreement to be a valid and subsisting contract.
 This argument ignores the nature of plaintiffs' action and assumes that defendants were required to seek some specific affirmative relief as a defense. Plaintiffs sought declaratory relief as to the construction and validity of an agreement, which defendants allege was induced by fraud. When the defendants pleaded that the second agreement was invalid *814 and unenforceable because it was obtained by fraud, they raised an issue of fact which required determination. If those pleaded facts were true, plaintiffs clearly were not entitled to a declaration that the contract was valid in all respects, and hence it was error to grant their motion for judgment on the pleadings, regardless of how defective defendants' pleadings may have been in connection with their rights to other relief. Since it appears, however, that defendants are seeking affirmative relief of some kind and the questions with reference thereto are earnestly argued by the parties and must ultimately be solved, we will consider the sufficiency of the pleadings in that regard.
 Defendants allege facts appropriate to an action for rescission or for damages for fraud, and they ask the court to declare that they are entitled to one-half of the profits of the joint venture. Their pleadings, however, do not clearly indicate the legal theory upon which their claim is based.
 On the theory of damages for fraud, the defendants have alleged, in effect, the existence of the original joint venture, the obtaining of the Utah Fuel job by agents acting for and on behalf of that venture, the violation of plaintiffs' fiduciary duty by their fraud and concealment, defendants' reliance on the representation, and its falsity. While the pleadings do not employ the word "damages" it may be that defendants intend to claim as damages the amount they would have received under the original joint venture but for the fraud of plaintiffs.
 As to the remedy of rescission, the pleadings are likewise indefinite, but they are not entirely inadequate. There is no positive and express assertion that rescission has been or is being sought, or that any notice described or intended as a notice of rescission was given. Defendants allege, however, in substance, that as soon as they discovered the fraud they notified plaintiffs that they would not be bound by the provisions of the second agreement relating to the division of profits and that they were entitled to an equal share of the profits and expected an adjustment when the Utah Fuel job was completed. [5] Moreover, when plaintiffs brought the action seeking to establish the validity of the second joint venture agreement they opened the door, and unless the right to rescind was lost or waived defendants were entitled to seek rescission as a defense to the action and as the basis for recovery. *815 (See Rosemead Co. v. Shipley Co., 207 Cal. 414, 420 [278 P. 1038]; McNeese v. McNeese, 190 Cal. 402, 405 [213 P. 36]; Hayt v. Bentel, 164 Cal. 680, 687 [130 P. 432]; Boulevard Land Co. v. King, 125 Cal.App. 224, 228 [13 P.2d 864]; see, also, Elrod-Oas Home Bldg. Co. v. Mensor, 120 Cal.App. 485, 489 [8 P.2d 171]; Rest., Contracts,  480.) [6] It is apparent that no offer to restore was necessary as a condition to rescission, since defendants are entitled, in any event, to retain what they have already received. (Matteson v. Wagoner, 147 Cal. 739, 744 [82 P. 436]; Richards v. Fraser, 122 Cal. 456, 461 [55 P. 246].)
 [7] Defendants by their cross-complaint allege, among other things, a misapplication of the funds of the original joint venture in connection with services performed under the Utah Fuel contract and pray for accounting. If these allegations are true, defendants would appear to be entitled to such accounting regardless of whether they have proper grounds for damages or rescission.
 Although defendants do not expressly seek rescission or specifically ask for damages, they are nevertheless entitled to any relief warranted by the facts pleaded, and their failure to ask for the proper relief is not fatal to their cause. (See Buxbom v. Smith, 23 Cal.2d 535, 542 [145 P.2d 305]; Pascoe v. Morrison, 219 Cal. 54, 58 [25 P.2d 9]; Zellner v. Wassman, 184 Cal. 80, 88 [193 P. 84]; Nathan v. Dierssen, 164 Cal. 607, 611 [130 P. 12].) They may seek to rescind and ask for damages in the alternative if they fail to establish a right to rescission. (See Wulfjen v. Dolton, 24 Cal.2d 891, 896 [151 P.2d 846]; Bancroft v. Woodward, 183 Cal. 99, 102 [190 P. 445]; Hjorth v. Bernstein, 44 Cal.App.2d 561, 565 [112 P.2d 643].) Under the circumstances, it was clearly error for the court to grant the motion for judgment on the pleadings without affording defendants an opportunity to amend, since the defects could be cured by amendment.
 [8] As stated in Kelley v. Kriess, 68 Cal. 210, 219 [9 P. 129], "If plaintiff has a good cause of action, which by accident or mistake he has failed to set out in his complaint, the court, on motion for judgment on the pleadings, should, on his application so to do, permit him to amend." The same rule applies to the defendants' pleading; and when the facts stated indicate that the party probably has a good *816 cause of action or defense, but that it has been pleaded imperfectly or defectively, and the defects have not been called to his attention by demurrer or by a notice of motion for judgment on the pleadings, the court should not grant the motion without first giving the party an opportunity to elect whether he will stand on his pleadings or amend them. The granting of the motion without leave to amend would in many cases be an absolute denial of justice, and is directly opposed to the policy of the law that cases should be tried and decided on the merits.
 [9] The plaintiffs have cited cases, such as Neher v. Kauffman, 197 Cal. 674 [242 P. 713], to the effect that a ruling denying permission to amend will not be disturbed on appeal where there is no tender of the proposed pleadings, and they claim that there was no abuse of discretion in this case because defendants failed to specify in the superior court the nature of the proposed amendment. While no proposed pleadings were tendered, defendants requested leave to amend "to conform with" the trial court's ruling that the pleadings were defective. Moreover, since there had been no demurrer and no intimation that any such attack would be made on the pleadings, it cannot be claimed that defendants were bound to appear at the time of trial armed with the proposed amendments to their pleadings. In addition, all the cases cited by plaintiffs were decided prior to the enactment, in 1939, of section 472c of the Code of Civil Procedure, which provides that the question whether the trial court abused its discretion in sustaining a demurrer without leave to amend "is open on appeal even though no request to amend such pleading was made." (See Wennerholm v. Stanford Univ. Sch. of Med., 20 Cal.2d 713, 718-720 [128 P.2d 522, 141 A.L.R. 1358].) Since the reason for the rule is the same on a motion for judgment on the pleadings, the same result should obtain.
 The judgment is reversed with directions to grant leave to defendants to amend their pleadings.
 Shenk, J., Edmonds, J., Carter, J., Traynor, J., Schauer, J., and Spence, J., concurred.
