Defendant first assigns error to the trial court’s action in denying her motion to dismiss plaintiff’s action on the grounds that it must be brought as an additional claim in the existing suit between the parties. We find no error in this regard.
Gardner v. Gardner, 294 N.C. 172, 240 S.E. 2d 399 (1978), relied on by defendant, is distinguishable. In Gardner, the wife on 12 May 1976 filed an action for alimony without divorce on the ground, among others, that her husband had abandoned her on 28 May 1975. While this action was pending and before filing answer therein, the husband on 1 June 1976 filed an action for absolute divorce on the ground of one year’s separation beginning 28 May 1975. The wife moved that the husband’s action be dismissed on the ground of her prior action pending or, in the alternative, that the husband’s action be stayed until her action could be determined. Her motion was denied. To review this ruling the wife petitioned this Court for a writ of certiorari, which petition was denied. The Supreme Court then granted her petition for discretionary review, finding error in the trial court’s denial of the wife’s motion, holding that the husband’s claim for absolute divorce may be denominated a compulsory counterclaim under G.S. 1A-1, Rule 13(a) in the wife’s prior action for alimony without divorce and that the husband’s action must be dismissed with leave to file it as a counterclaim in the wife’s action or stayed pending entry of final judgment in the wife’s action.
In reaching this conclusion, Justice Exum, speaking for our Supreme Court, reasoned:
We are satisfied the husband’s claim for divorce may be denominated a compulsory counterclaim. It arises out of the same transaction or occurrence that forms the basis for the wife’s abandonment claim. The wife contends the husband abandoned her 28 May 1975. The husband contends his leaving was a separation entitling him to a divorce. Although when this case was argued the husband had not filed an answer, his claim had accrued in time for him to have filed it with his answer when the answer became due.
294 N.C. at 176, 240 S.E. 2d at 403.
*305In the present case the husband’s action for absolute divorce did not arise out of the same transaction or occurrence that forms the basis of any claim asserted by either party in the prior action. The prior action was instituted by the husband on 10 December 1976. By an amended complaint filed and served on 27 December 1976 he alleged that defendant wife had offered such indignities as to render his condition intolerable and his life burdensome, and on these allegations he prayed for a divorce from bed and board. On 24 March 1977 defendant wife filed answer and counterclaim, alleging indignities and adultery on the part of the husband and seeking an award of alimony. It is thus apparent that at the time the plaintiff husband instituted the prior action and at the time he was called upon to plead in response to his wife’s counterclaim for alimony therein, the grounds upon which he bases his present action for an absolute divorce did not exist. Under these circumstances we hold that plaintiff’s present action for an absolute divorce was not such a claim as he was compelled by G.S. 1A-1, Rule 13(a) to file in the prior pending action.
Nor, since the effective date of the amendment to G.S. 50-6 made by Ch. 1190, sec. 1 of the 1977 Session Laws, does any reason remain for requiring a stay of the present action pending resolution of the defendant-wife’s counterclaim for alimony in the prior action. That amendement, which became effective 16 June 1978, three days prior to institution of the present action, added the following to G.S. 50-6:
A plea of res judicata or of recrimination, with respect to any provision of G.S. 50-5 or of G.S. 50-7, shall not be a bar to either party’s obtaining a divorce under this section. Notwithstanding the provisions of G.S. 50-11, or of the common law, a divorce under this section obtained by a supporting spouse shall not affect the rights of the dependent spouse with respect to alimony which have been asserted in the action or any other pending action.
Defendant-wife’s claim for alimony, having been asserted in the prior action, will not be affected by an absolute divorce obtained by plaintiff-husband in the present action.
We find no merit in defendant’s contention that G.S. 50-6 as amended is unconstitutional because it violates the equal protection clauses contained in the Fourteenth Amendment to the *306Federal Constitution and in Art. 1, Sec. 19 of our State Constitution. The gist of defendant’s argument in this connection seems to be that the amended G.S. 50-6 violates equal protection by preserving a dependent spouse’s right to alimony without at the same time preserving all other property rights incident to continuation of the marital status. This argument is beside the mark. The equal protection clauses of our State and Federal Constitutions prohibit the denial of the equal protection of the laws to persons, not to rights.
Defendant assigns error “[t]o the Court entering a summary judgment granting Plaintiff a divorce in the face of Defendant’s demand for a jury trial, regardless of the uncontested nature of the facts alleged in Plaintiff’s complaint.” In discussing this assignment of error, we note at the outset that a summary judgment may not be entered granting an absolute divorce in this State. This is so because G.S. 50-10 contains the following express provisions:
The material facts in every complaint asking for a divorce or for an annulment shall be deemed denied by the defendant, whether the same shall be actually denied by pleading or not, and no judgment shall be given in favor of the plaintiff in any such complaint until such facts have been found by a judge or jury. The determination of whether there is to be a jury trial or a trial before the judge without a jury shall be made in accordance with G.S. 1A.-1, Rules 38 and 39. (Emphasis added.)
A summary judgment, provided for in our practice by G.S. 1A-1, Rule 56, should be entered only where it is shown that “there is no genuine issue as to any material fact and that any party is entitled to judgment as a matter of law.” By virtue of G.S. 50-10 the material facts in a divorce action are “deemed denied by the defendant, whether the same shall actually be denied by pleading or not.” Thus, in a divorce action the statute creates a genuine issue as to the material facts whether or not the parties raise such an issue and even where they attempt to admit or stipulate the facts. If it is necessary for the court or the jury to find the material facts, as G.S. 50-10 makes mandatory in a divorce action, summary judgment may not be entered. Therefore, a divorce decree may not be granted by way of a summary judgment, and if *307such a decree had been entered in this case, it would have been error. Examination of the record reveals, however, that although plaintiff moved for a summary judgment and the court at one point seemed to indicate that it was allowing the motion, what actually occurred was that the court heard the testimony of witnesses, who were subject to cross-examination by defendant’s counsel, and after hearing this evidence and on the basis thereof, the court found the facts as required by G.S. 50-10. Thus, the judgment entered in this case was not a summary judgment but was one rendered by the court after making appropriate findings of fact.
The question remains whether the court, in the face of defendant’s timely demand for a jury trial made in her answer, and in the face of defendant’s continued insistence on a jury trial made at the hearing, committed error by finding the facts itself without a jury. We find error in this regard. G.S. 50-10 expressly provides that “[t]he determination of whether there is to be a jury trial or a trial before the judge without a jury shall be made in accordance with G.S. 1A-1, Rules 38 and 39.” As already noted, G.S. 50-10 itself raises issues in a divorce action as to all material facts, regardless of whether the parties by their pleadings have raised any issue and even where, as here, all material facts are admitted. Thus, G.S. 50-10 has the effect of prohibiting entry of a divorce decree by consent, stipulation, or admissions of'the parties, and requires instead that all material facts be found, either by a jury where the right to a jury trial has been preserved as provided in G.S. 1A-1, Rules 38 and 39, or by the court in case a jury trial has been waived. In the present case, the defendant in apt time and manner demanded a jury trial and did not thereafter waive but continued to assert her right to a jury trial. It may seem futile for defendant to insist upon a trial by jury when, but for G.S. 50-10, no real issue exists. That statute, however, gives her the right to do so, and the trial court erred in denying her right to have the facts found in a trial by jury.
For failure to accord defendant a jury trial, the judgment appealed from is vacated and this cause is remanded for a
New trial.
Judges ERWIN and MARTIN (Harry C.) concur.