
568 So.2d 549 (1990)
George L. PERKINS and Ruth Perkins
v.
SCAFFOLDING RENTAL and ERECTION SERVICE, INC., et al.
No. 90-CC-0647.
Supreme Court of Louisiana.
October 22, 1990.
*550 A. Lane Plauche, Jeffrey M. Cole, Plauche, Smith & Nieset, Lake Charles, for Conoco Inc. defendant-applicant.
Joe A. Brame, Brame, Bergstedt & Brame, Lake Charles, for Scaffolding Rental & Erection Serv. defendant-applicant.
Robert L. Beck, Jr., Alexandria, for Ruth & George Perkins, plaintiffs-respondents.
Sidney L. Shushan, Guste, Barnett & Shushan, New Orleans, Counsel for Scaffolding Rental and Erection Service Inc., et al., defendants-applicants.
Lee Gallaspy, Baton Rouge, Raggio, Cappel, Chozen & Berniard, Lake Charles, for Globe Indem. Co. Other.
MARCUS, Justice.[*]
George L. Perkins was employed as a pipe-fitter by J.W. Contractors, Inc. when he alleged he was injured in a fall from scaffolding. Perkins and his wife sued Scaffolding Rental and Erection Service, Inc., Safway Steel Products, a division of Figgie International, Inc. ("Safway"), and Conoco, Inc. alleging that the accident occurred at Conoco's refinery and that his injuries, including a fractured right femur, "were caused by the defective, deteriorated, improperly installed and dangerous condition of the scaffolding and/or appendages thereto." Damages sought included pain and suffering, mental anguish, medical expenses, lost earnings, and loss of consortium. Conoco filed a peremptory exception of no cause of action. The trial judge sustained the exception and ordered plaintiffs to amend their petition within ten days to state a cause of action against Conoco, failing which the petition would be dismissed with prejudice. Plaintiffs failed to amend the petition. Subsequently, the trial judge rendered a judgment dismissing Conoco with prejudice. Plaintiffs did not appeal, and the judgment became definitive.
Two years after the suit against Conoco was dismissed, Safway filed a third party petition against Conoco seeking indemnification and contribution from Conoco in the event Safway was held liable to plaintiffs. Safway alleged that any defect in the scaffolding "resulted from improper erection and maintenance of the scaffold, [which] should have been detected by [Conoco if it] had properly performed its duty as owner of the premises to inspect the scaffold prior to its use by any workers on [its] premises." Conoco filed an exception of no cause of action on the ground that previously it had been dismissed with prejudice from the suit. The trial judge overruled the exception. Conoco applied for supervisory writs to the court of appeal which granted the application. Finding that Safway's third party demand failed to state a cause of action against Conoco for indemnity or contribution, the court reversed the judgment of the trial court, maintained the exception of no cause of action, and allowed Safway twenty days to amend its petition to state a cause of action against Conoco based upon indemnity.[1] On Safway's application to this court, we granted certiorari to review the correctness of that ruling.[2]
The sole issue for our determination is whether third party plaintiff (Safway) has a right of contribution against alleged co-tortfeasor (Conoco) when plaintiffs' action has been dismissed with prejudice against Conoco by a definitive judgment based on an exception of no cause of action. Before answering this question, we must determine whether Safway's sole source of contribution is subrogation and, if so, whether plaintiffs have any rights to subrogate to Safway since their claims against defendant (Conoco) were dismissed with prejudice.
The right to contribution is set forth in article 1804 of the civil code which provides in pertinent part: "A solidary obligor *551 who has rendered the whole performance, though subrogated to the right of the obligee, may claim from the other obligors no more than the virile portion of each." (emphasis added.) The source of the right to claim contribution is subrogation. Article 1805 follows and expands on the previous article. It is entitled "Enforcement of contribution" and states:
A party sued on an obligation that would be solidary if it exists may seek to enforce contribution against any solidary co-obligor by making him a third party defendant according to the rules of procedure, whether or not that third party has been initially sued, and whether the party seeking to enforce contribution admits or denies liability on the obligation alleged by plaintiff.
Safway relies on article 1805 to support its claim that it has an independent right of contribution that does not stem from the right of subrogation. Safway's reliance is misplaced. The predecessor to article 1805, article 2103 of the Civil Code of 1870, was amended in 1960 to overrule legislatively Kahn v. Urania Lumber Co., 103 So.2d 476, 478 (La.App. 2d Cir.1958), which stood for the proposition that "there is no right of contribution between joint tort-feasors unless and until they have been condemned in a judgment in solido, and then only in favor of the joint tort-feasor who has paid the damages awarded." See Harvey v. Travelers Insurance Co., 163 So.2d 915 (La.App. 3d Cir.1964); Expose Des Motifs, Book III, La.Civ.Code Ann. 14; Comment, Contribution Among Joint Tortfeasors, 22 La.L.Rev. 818, 820 (1962). The article thus changed the time when a demand for contribution could be asserted and allowed a defendant to seek contribution against a co-obligor who had not already been cast in judgment. It did not affect the substantive basis for seeking contribution set forth in article 1804, which is subrogation to the rights of plaintiff.[3]
Application of this principle is reflected in comment c to article 1805 which states that "[a]n obligor who has been released by his obligee is no longer an obligor and therefore cannot be made a third party." See also La.Civ.Code art. 1803. In a sense by failing to state a cause of action, failing to amend their petition, and then failing to appeal a dismissal with prejudice, plaintiffs tacitly released Conoco.[4] Conoco is no longer an obligor to plaintiffs, and neither plaintiffs nor any party seeking to stand in their shoes through subrogation can have a cause of action against Conoco based on the allegations in plaintiffs' petition. Safway does not have an independent right of contribution from Conoco and is only subrogated to the rights of plaintiffs. See, e.g., Lebleu v. Southern Silica of Louisiana, 554 So.2d 852 (La.App. 3d Cir. 1989), writ denied, 559 So.2d 489, 490, 491 (La.1990); Thompson v. Cane Garden Apartments, 480 So.2d 373 (La.App. 3d Cir.1985); Sellers v. Seligman, 463 So.2d 697 (La.App. 4th Cir.), writ denied, 464 So.2d 1379 (La.1985); Harvey, 163 So.2d at 921.
Having concluded that Safway's sole source of contribution from Conoco is subrogation, we address the question of whether Safway is subrogated to any rights of plaintiffs that would allow Safway to maintain the cause of action against Conoco for contribution based on the allegations *552 set forth in its third party petition. Through subrogation Safway can have no greater rights than plaintiffs[5]if plaintiffs are barred by res judicata from maintaining the claims in Safway's third party petition, Safway is equally barred.
Although plaintiffs' action against Conoco was dismissed with prejudice[6] on an exception of no cause of action, and that judgment is now definitive, under this state's interpretation of the doctrine of res judicata,[7] plaintiffs are not precluded from filing a suit against Conoco stating a different cause of action.[8] Our courts have had difficulty in identifying what constitutes the same cause of action, but we need not address what possible causes of action that plaintiffs might be able to assert against Conoco. We only need resolve a single question: if plaintiffs brought a new action asserting the same allegations set forth in the third party petition filed by Safway, should that petition be dismissed as res judicata. In other words, did Safway's petition state a cause of action based on the same juridical or material facts alleged in plaintiffs' petition which was dismissed with prejudice?
In Preis v. Standard Coffee Service Co., 545 So.2d 1010, 1013 (La.1989),[9] we defined the civilian concept of cause of action within the context of a claim of res judicata:
It is well-settled that the term "cause of action" as used in La.R.S. 13:4231 is a mistranslation from the French and really refers to the civil law concept of *553 cause. Cause in this context has been defined as "the juridical or material fact which is the basis of the right claimed, or the defense pleaded." It is the "legal obligation upon which the action is founded."

(citations omitted; emphasis added.)
Plaintiffs' petition alleged Conoco's ownership of the property and asserted a claim of negligence against all defendants for the condition of the scaffolding and appendages thereto. Their claimed damages stemming from George Perkins' accident included physical pain and suffering, mental anguish, medical expenses, loss of past and future earnings, and loss of consortium. Louisiana has adopted fact pleading, and it is not necessary to plead the theory of a case in a petition. Kizer v. Lilly, 471 So.2d 716, 719 (La.1985); La. Code Civ.P. art. 891. This allows a plaintiff to recover under whatever legal theory is appropriate based on the facts pleaded. The facts alleged in plaintiffs' petition were not sufficient to state a cause of action, but once this petition was dismissed with prejudice, plaintiffs were precluded from reasserting a claim that was based on the same cause of action arising out of these juridical or material facts. See Batson v. Cherokee Beach and Campgrounds, Inc., 530 So.2d 1128, 1130-31 (La.1988).
In its third party petition, Safway asserts that any defect in the scaffolding resulted from improper erection and maintenance, which defect should have been detected by Conoco if it had properly performed its duty as owner of the premises to inspect the scaffolding prior to its use by any worker. There is but one legal obligationthat stemming from the duty to maintain the scaffolding and its appendages in a safe condition. Safway's third party petition asserts a cause of action based on the same legal obligation upon which plaintiffs' original petition was founded. Thus plaintiffs and Safway, through subrogation to plaintiffs' rights, are precluded by res judicata from maintaining the cause of action against Conoco set forth in Safway's third party petition.[10]
In sum, Safway has no right to contribution from Conoco other than subrogation to the rights of plaintiffs; plaintiffs are barred by res judicata from maintaining a cause of action against Conoco arising out of the material or juridical facts alleged in their petition which was dismissed with prejudice; Safway's third party petition asserts a cause of action based on the same juridical or material facts alleged in plaintiffs' original petition; and thus plaintiffs and Safway, through subrogation to plaintiffs' rights, are precluded by res judicata from maintaining the cause of action against Conoco set forth in Safway's third party petition. Accordingly, Safway's third party petition was properly dismissed for failing to state a cause of action.

DECREE
For the reasons assigned, the judgment of the court of appeal is affirmed. All costs are assessed against Safway Steel Products, a division of Figgie International, Inc.
LEMMON, J., concurs and assigns reasons.
DENNIS, J., concurs with reasons to be assigned.
NOTES
[*]  Charles A. Marvin, associate justice ad hoc, sitting for Associate Justice Luther F. Cole, recused.
[1]  Accordingly, the question of a right of indemnity is not before this court.
[2]  561 So.2d 109 (La.1990).
[3]  In Smith v. Southern Farm Bureau Casualty Insurance Co., 247 La. 695, 174 So.2d 122 (1965), this court allowed a joint tortfeasor the right of contribution against a negligent husband, against whom the plaintiff wife could not sustain an action because of spousal immunity. The immunity statute did not destroy the substantive cause of action arising between the husband and the wife but operated only as a procedural bar to an action by the wife. See also Walker v. Milton, 263 La. 555, 268 So.2d 654 (1972) (applying the same principle to suits between parent and child). These cases apply to the specific application of the statutes on intra-family immunity and cannot be expanded beyond their facts.
[4]  This case is distinguished from Mullin v. Skains, 252 La. 1009, 215 So.2d 643 (1968), where we held that a dismissal by voluntary nonsuit against one co-tortfeasor did not bar a claim of contribution from that tortfeasor. The dismissal as a nonsuit did not preclude refiling by plaintiff. In this case, plaintiffs' action against Conoco was dismissed with prejudice, precluding further litigation, and thus precluding the demand for contribution.
[5]  See Bosch v. Cummings, 520 So.2d 721 (La. 1988); Theriot v. Bergeron, 552 So.2d 1 (La.App. 1st Cir.1989); La.Civ.Code arts. 1825, 1826; see also Complaint of Admiral Towing and Barge Co., 767 F.2d 243 (5th Cir.1985).
[6]  Article 1673 of the Code of Civil Procedure provides:

A judgment of dismissal with prejudice shall have the effect of a final judgment of absolute dismissal after trial. A judgment of dismissal without prejudice shall not constitute a bar to another suit on the same cause of action.
Prior to the 1960 enactment of the Code of Civil Procedure, this court held that a dismissal of a suit on an exception of no cause of action based on the insufficiency of the allegations was a nonsuit and did not preclude the plaintiff's reassertion of his case in a properly pleaded petition. See, e.g., McCoy v. Arkansas Natural Gas Co., 184 La. 101, 165 So. 632 (1936); Laenger v. Laenger, 138 La. 532, 70 So. 501 (1915). The adoption of the Code of Civil Procedure eliminated the problem of possible inequities based on dismissals for technical defects in the petition. The code now provides flexibility to the trial court to dismiss a case with or without prejudice, La.Code Civ.P. art. 1673, and further directs the trial court to allow a plaintiff to amend his petition when the grounds of the objection pleaded may be removed by amendment. Id. art. 934.
[7]  Res judicata is set out in La. R.S. 13:4231, which states:

The authority of the thing adjudged takes place only with respect to what was the object of the judgment. The thing demanded must be the same; the demand must be founded on the same cause of action; the demand must be between the same parties, and formed by them against each other in the same quality.
The civilian view of res judicata was altered by the Legislature in Act 521 of the 1990 regular session. Effective January 1, 1991, the general rule stated in La. R S. 13:4231 will be as follows:
Except as otherwise provided by law, a valid and final judgment is conclusive between the same parties, except on appeal or other direct review, to the following extent:
(1) If the judgment is in favor of the plaintiff, all causes of action existing at the time of final judgment arising out of the transaction or occurrence that is the subject matter of the litigation are extinguished and merged in the judgment;
(2) If the judgment is in favor of the defendant, all causes of action existing at the time of final judgment arising out of the transaction or occurrence that is the subject matter of the litigation are extinguished and the judgment bars a subsequent action on those causes of action;
(3) A judgment in favor of either the plaintiff or the defendant is conclusive, in any subsequent action between them, with respect to any issue actually litigated and determined if its determination was essential to that judgment.
[8]  As the issue before us is the theoretical possibility of a suit between plaintiffs and Conoco, we do not address the other requisite elements of res judicata.
[9]  In Preis, we held that a suit which determined an employee's nonsolicitation agreement with his former employer was invalid had res judicata effect in the employee's subsequent action seeking damages under the unfair trade practices and consumer protection law. The second suit arose out of the same juridical and material facts.
[10]  This case is distinguished from a case like Mitchell v. Bertolla, 340 So.2d 287 (La.1976) in which a plaintiff unsuccessfully sued to rescind a lease for lesion beyond moiety and non payment of rent, and then sued to rescind the same lease for fraud. We held that the second suit was not barred by res judicata because it was based on a different cause. The legal principle upon which the demand was based was different. In this case, there is no difference in legal principles. Only the evidence alleged to support a claim of negligence is different. A difference in evidence does not state a new cause of action. Id. at 291; Succession of Reynolds, 231 La. 410, 91 So.2d 584 (1956).
