
4 So.3d 869 (2008)
Rosie Mae Forbes BARKER
v.
DEPARTMENT OF TRANSPORTATION AND DEVELOPMENT FOR the STATE of Louisiana, and the State of Louisiana.
No. 2008 CA 1084.
Court of Appeal of Louisiana, First Circuit.
December 23, 2008.
*870 John Chandler Loupe, Baton Rouge, LA, for Plaintiff/Appellant, Rosie Mae Forbes Barker.
Charles D. McBride, Baton Rouge, LA, for Defendant/Appellee, State of Louisiana, through the Department of Transportation and Development.
Before KUHN, GUIDRY, and GAIDRY, JJ.
GUIDRY, J.
A year after selling land in Livingston Parish to the State of Louisiana through the Department of Transportation and Development (DOTD), the appellant, Rosie Mae Forbes Barker, filed a petition for damages seeking to rescind the sale on the grounds of lesion beyond moiety. In response, the DOTD filed a peremptory exception objecting to Ms. Barker's petition on the basis of res judicata. The trial court sustained the peremptory exception and dismissed Ms. Barker's petition for damages with prejudice. This devolutive appeal followed.
While acknowledging that the contract of sale contains language whereby she agreed to settle and compromise "all claims of any kind," Ms. Barker contends that the trial court erred in sustaining the exception because by law "a seller may invoke lesion even if he has renounced his right to claim it." See La. C.C. art. 2589. However, at the time the sales contract was executed, La. C.C. art. 3078[1] provided "[transactions have, between the interested parties, a force equal to the authority of things adjudged. They can not be attacked on account of any error in law or any lesion." Thus, in this appeal, we are asked to resolve the seeming conflict between these two articles of the Louisiana Civil Code.
In Dornier v. Live Oak Arabians, Inc., 602 So.2d 743 (La.App. 1st Cir.), writ denied, 608 So.2d 177 (La.1992), the court was faced with a similar issue of determining which of two conflicting codal articles should prevail. In that case, the court had *871 to determine whether the partition agreement was simply a partition agreement, which would be subject to rescission for lesion according to then La. C.C. art. 1398 (see now La. C.C. art. 814), or whether the partition agreement would be more properly classified as a transaction or compromise, which would not be subject to rescission on the ground of lesion according to La. C.C. art. 3078. Dornier, 602 So.2d at 746. Based on the explicit language of the agreement, the court found that the partition agreement was actually a transaction and compromise confected by the parties to settle a pending lawsuit; thus, the court held that the agreement was not subject to an attack for lesion. Dornier, 602 So.2d at 747-48.
Likewise, we find that the sales contract between Ms. Barker and the DOTD is unquestionably a transaction or compromise agreement. The applicable version of La. C.C. art. 3071[2] defines a "transaction or compromise," in pertinent part, as
an agreement between two or more persons, who, for preventing or putting an end to a lawsuit, adjust their differences by mutual consent, in the manner which they agree on, and which every one of them prefers to the hope of gaining, balanced by the danger of losing.

This contract must be either reduced into writing or recited in open court and capable of being transcribed from the record of the proceeding. [Emphasis added.]
While the sales contract at issue in this case was not executed to settle or put an end to a lawsuit like in the Dornier case, it was clearly confected to prevent the filing of a lawsuit, or more specifically, an expropriation suit, as shown in the following language quoted from the sales contract:
The Vendor acknowledges and agrees that the consideration provided herein constitutes full and final payment for the property hereby conveyed and for any and all diminution in the value of Vendor's remaining property as a result of the transfer of this property for transportation purposes
The consideration recited herein represents full and final settlement of all claims of any kind to the full extent of the Vendor's loss, except relocation assistance claims where applicable, and specifically represents a compromise by all parties to avoid formal expropriation proceedings and the added expenses of litigation. [Emphasis added.]
It is well settled in our jurisprudence that compromise agreements between parties to avoid litigation are favored by law, and courts will not declare a settlement void without a clear showing that it violates good morals or public interest. Bass v. LaPorte, 95-0867, p. 5 (La. App. 1st Cir.2/14/97), 691 So.2d 138, 140, writ denied, 97-0646 (La.4/25/97), 692 So.2d 1088. The defense that a suit is barred by a valid written compromise may be raised by an exception of res judicata and tried separately in advance of trial on the merits. Smith v. Leger, 439 So.2d 1203, 1205 (La.App. 1st Cir.1983). Since La. C.C. art. 3078 provided that "[transactions have, between the interested parties, a force equal to the authority of things adjudged[,]" the trial court's judgment sustaining the peremptory exception on the basis of res judicata and dismissing Ms. Barker's petition with prejudice is correct. See also La. R.S. 13:4231; La. C.C.P. art. *872 927; Childs v. Woods, 01-1444 (La.App. 1st Cir.6/21/02), 822 So.2d 732.
Accordingly, we affirm the judgment of the trial court and all costs associated with this appeal are cast to the appellant, Rosie Mae Forbes Barker.
AFFIRMED.
NOTES
[1]  By 2007 La. Acts, No. 138, § 1, articles 3071 through 3083 of the Louisiana Civil Code, under the title "Of Transaction or Compromise," were amended and re-enacted. The provisions of former La. C.C. art. 3078 can now be found in La. C.C. art. 3080, which provides "[a] compromise precludes the parties from bringing a subsequent action based upon the matter that was compromised," and in La. C.C. art. 3082, which provides, in pertinent part, "a compromise cannot be rescinded on grounds of error of law or lesion."
[2]  Following amendment and re-enactment in 2007, La. C.C. art. 3071 now provides "[a] compromise is a contract whereby the parties, through concessions made by one or more of them, settle a dispute or an uncertainty concerning an obligation or other legal relationship."
