
5 Cal.Rptr.3d 224 (2003)
112 Cal.App.4th 582
Loula A. AMIN, Plaintiff and Respondent,
v.
Faika KHAZINDAR, Defendant and Appellant.
No. B157997.
Court of Appeal, Second District, Division Seven.
October 6, 2003.
Review Denied January 14, 2004.
*226 Michael Carter Smith; Ezer, Williamson & Brown and Mitchel J. Ezer, Los Angeles, for Defendant and Appellant.
Bridgford, Knottnerus & Gleason, Richard K. Bridgford and Mark B. Simpkins, Newport Beach, for Plaintiff and Respondent.
*225 MUÑOZ (AURELIO), J.[*]
Faika Khazindar (Khazindar) appeals order expunging a recorded homestead. The trial court held the homestead could not be asserted because it was barred by the doctrines of res judicata and collateral estoppel, relying on Krier v. Krier (1946) 28 Cal.2d 841, 172 P.2d 681. Khazindar argues that Krier is inapplicable because in the instant case there was no homestead recorded at the time of trial and therefore the issue of her homestead could not have been asserted at that time, and further because her homestead declaration could not have been recorded until after trial was completed. We reject these arguments and affirm the trial court's order.

FACTUAL BACKGROUND AND PROCEDURAL HISTORY
We recite the relevant facts, which are essentially undisputed. In February 1987, plaintiff Loula S. Amin (Amin) and Khazindar orally agreed to purchase, for investment, an interest in a long-term leasehold for a condominium in Marina Del Rey (the property). Amin and Khazindar held the property as tenants in common. In order to finance the transaction, Amin and Khazindar obtained a loan of approximately $374,654 secured by a deed of trust on the property. Amin also loaned Khazindar part of Khazindar's share of the down payment. They orally agreed that each would contribute one-half of the payments on the property, and Khazindar would live in the property, paying Amin one-half of the fair market rental value of the property. Khazindar has occupied the property as her primary residence.
In September 1995, Khazindar told Amin that she had found a buyer for the *227 property and insisted that Amin, whose husband was gravely ill, execute a blank quitclaim deed so that the property could be quickly sold. Because the buyer was unsure of how title would be taken, Khazindar assured Amin she would insert the name of the grantee into the deed once the buyer provided conclusive instructions. The quitclaim deed was not notarized. Khazindar told Amin that she would be paid her share of the proceeds immediately upon the sale of the property. Amin complied and signed the quitclaim deed.
The quitclaim deed was recorded on October 3, 1995, naming Khazindar as grantee and containing a notarization of Amin's signature. In December 1996, Amin questioned Khazindar about the sale of the property. In March 1997, Amin learned that Khazindar had recorded the deed naming herself as grantee.
Subsequently, Khazindar transferred the property to a third party, Abdulladiz Alhusseini.
On July 24, 1997, Amin commenced this action for fraud, cancellation of instrument, quiet title, unjust enrichment, constructive trust, breach of contract, rescission and restitution, mistake of fact, negligent misrepresentation, trespass, intentional infliction of emotional distress, and negligent infliction of emotional distress.
A bifurcated trial was held on the legal issues, and on October 8, 1999, the jury found for Amin. A trial of the remaining equitable issues (quiet title, partition and sale,[1] and cancellation of deed) was held November 1, 1999. The court cancelled the deed executed by Amin conveying the property to Khazindar, and the deed by Khazindar conveying the property to Alhusseini. The court ordered that title revert to the status quo ante, i.e., a tenancy in common between Amin and Khazindar, and ordered that the property be partitioned and sold. Judgment was entered February 23, 2000. Amin was awarded $24,000 for breach of contract, $92,400 on the fraud claim, and $500,000 in punitive damages. The judgment also provided for relief in accordance with the trial court's holdings at the equitable bench trial.
On February 24, 2000, Khazindar recorded a declaration of homestead against the property. An abstract of judgment was issued August 7, 2000, and apparently recorded August 23, 2000. Amin offered to purchase the property from Khazindar, and the offer was accepted by the referee overseeing the court-ordered partition and sale.
In December 2001, Amin moved to expunge the homestead on the grounds it did not create an enforceable exception against her. Amin alleged that Khazindar had been continuously residing in the property, but had failed to pay rent from and after September 1999. Khazindar had ceased making mortgage payments in May 2001, causing the lender to declare a default; Amin had cured the default and had been paying the mortgage. Amin argued that the homestead did not create an exemption between cotenants where the property is ordered partitioned and sold, citing Squibb v. Squibb (1961) 190 Cal.App.2d 766, 769, 12 Cal.Rptr. 346.) Amin also argued that the homestead claim was barred by res judicata because it was not raised in the prior equitable and legal proceedings, citing *228 Krier v. Krier, supra, 28 Cal.2d at p. 843,172 P.2d 681.)
Khazindar contended that the homestead had priority over the abstract of judgment because it had been recorded first. She also argued that she was not using the homestead as a bar to partition, and that she was not required to litigate her homestead claim in the equity phase of the litigation because a homestead is not a property right, citing Squibb v. Squibb.
The trial court ordered that based upon the doctrine of res judicata, the homestead was unenforceable against Amin.

DISCUSSION

The Partition Action Operates as a Bar to A Subsequent Assertion of the Homestead Exemption
Homestead laws are designed to protect the sanctity of the family home against a loss caused by a forced sale by creditors. The homestead exemption itself does not have any effect on the liens created voluntarily by the property owners, nor does it have any effect on the claims of creditors secured by liens that have priority over the declaration of homestead. (5 Miller & Starr, California Real Estate § 13.43 (3d ed.1996)). The homestead exemption ensures that insolvent debtors and their families are not rendered homeless by virtue of an involuntary sale of the residential property they occupy. Thus, the homestead law is not designed to protect creditors, but protects the home against creditors of the declarant, thereby preserving the home for the family. This strong public policy requires courts to adopt a liberal construction of the law and facts to promote the beneficial purposes of the homestead legislation to benefit the debtor. (5 Miller & Starr, California Real Estate § 13.43; Code Civ. Proc., § 703.010, subd. (a).)
In California, a homestead exemption may be asserted two ways. First, a declaration of homestead may be recorded. (Code Civ. Proc., § 704.920.) A recorded homestead protects the property from execution by certain creditors to the extent of the amount of the homestead exemption. (In re Mulch (Bankr.N.D.Cal. 1995) 182 B.R. 569, 572 [applying California homestead exemption].) Because many California debtors failed to file homestead exemptions, the legislature in 1974 enacted legislation which created an "automatic" homestead exemption.[2] (Code Civ. Proc., § 704.720.) This exemption need not be memorialized in a recorded homestead declaration in order to be effective. "The automatic homestead exemption is available when a party has continuously resided in a dwelling from the time that a creditors' lien attaches until a court's determination in the forced sale process that the exemption does not apply." (In re Mulch, supra, at p. 572; Webb v. Trippet (1991) 235 Cal.App.3d 647, 651, 286 Cal.Rptr. 742.)
As noted in In re Mulch, the two exemptions are distinct protections and they operate differently. The declared homestead provides greater rights than the automatic homestead. The declared homestead provides protection from a voluntary sale; judgment liens only attach to the equity in excess of consensual liens; and the protections of the declared homestead survive the death of the homestead owner. The proceeds from a voluntary sale may be reinvested within six months, thus allowing the debtor to invest *229 in another residence. (In re Mulch, supra, 182 B.R. at p. 573.) On the other hand, the automatic homestead only entitles the debtor to protection from a forced execution sale. (Ibid.)
The fact that a homestead is recorded against property does not affect the ability of the owner to convey or encumber the property. (Wolfe v. Lipsy (1985) 163 Cal.App.3d 633, 642, 209 Cal.Rptr. 801, disapproved on other grounds by Droeger v. Friedman, Sloan & Ross (1991) 54 Cal.3d 26, 283 Cal.Rptr. 584, 812 P.2d 931.) The exemption continues in the proceeds after sale. (Code Civ. Proc., §§ 704.710, subd. (c), 704.960, subd. (b).) With respect to a judgment lien, which is created by the recordation of an abstract of judgment, the judgment lien only attaches to the equity in the property above and beyond the recorded homestead exemption and any preexisting liens on the property. (Code Civ. Proc., §§ 697.310, subd. (a), 704.950, subd. (c); Smith v. James A. Merrill, Inc. (1998) 64 Cal.App.4th 94, 99, 75 Cal. Rptr.2d 108.) Where a residential exemption is claimed, the judgment creditor is required to obtain a court order for sale of the real property homestead. The court determines at a hearing the amount of the "dwelling exemption" and the fair market value of the property. The real property dwelling may not be sold at an execution sale unless the bid exceeds the amount needed to satisfy "all liens and encumbrances" on the property plus the amount of the homestead exemption, but excluding the lien of the judgment debtor. (Code Civ. Proc., § 704.800, subd. (a); see also Rourke v. Troy (1993) 17 Cal.App.4th 880, 885-886, 21 Cal.Rptr.2d 660.)
Under the doctrine of res judicata, a valid, final judgment on the merits is a bar to a subsequent action by parties or their privies on the same cause of action. (Mycogen Corp. v. Monsanto Co. (2002) 28 Cal.4th 888, 896, 123 Cal.Rptr.2d 432, 51 P.3d 297.) In California, a "cause of action" is defined by the "primary right" theory. "The most salient characteristic of a primary right is that it is indivisible: the violation of a single primary right gives rise to but a single cause of action." (Crowley v. Katleman (1994) 8 Cal.4th 666, 681, 34 Cal.Rptr.2d 386, 881 P.2d 1083.) In particular, the primary right theory provides that a cause of action consists of (1) a primary right possessed by the plaintiff, (2) a corresponding duty devolving upon the defendant, and (3) a delict or wrong done by the defendant which consists of a breach of the primary right. (Gamble v. General Foods Corp. (1991) 229 Cal.App.3d 893, 898, 280 Cal.Rptr. 457.) "`If the matter was within the scope of the action, related to the subject matter and relevant to the issues, so that it could have been raised, the judgment is conclusive on it despite the fact that it was not in fact expressly pleaded or otherwise urged... . The reason for this is manifest. A party cannot by negligence or design withhold issues and litigate them in consecutive actions. Hence the rule is that the prior judgment is res judicata on matters which were raised or could have been raised, on matters litigated or litigable. [Citations.]' [Citation.]" (Tensor Group v. City of Glendale (1993) 14 Cal.App.4th 154, 160, 17 Cal.Rptr.2d 639.)
In Krier, relied on by the trial court to apply the bar of res judicata to Khazindar's assertion of the homestead exemption, the parties were husband and wife who owned a farm. The parties separated, and the wife remained on the farm. The next year, she recorded a declaration of homestead and on the same day filed an action for maintenance. The maintenance action made no mention of the homestead, instead referring to the community interest *230 in the farmland. During trial of the maintenance action, the wife made no mention of her homestead. (Krier v. Krier, supra, 28 Cal.2d at p. 842, 172 P.2d 681.) After judgment in the maintenance action became final, the husband filed an action for partition of the property. The wife answered and cross-claimed, and for the first time mentioned her homestead interest. (Id. at pp. 842-843, 172 P.2d 681.) Krier held the maintenance action was bar to any assertion of the wife's homestead interest in the partition action. "[E]ven though the causes of action be different, the prior determination of any issue is conclusive in a subsequent suit between the same parties as to that issue and every matter which might have been urged to sustain or defeat its determination." (Id. at p. 843, 172 P.2d 681.) Thus, the wife should have asserted her homestead claim in the maintenance action and was precluded from relitigating the issue of the scope of her interest in the property. (Id. at pp. 843-844, 172 P.2d 681.)
Although the facts are slightly different, we see no reason not to apply Krier here. When Amin filed her complaint in 1997, she sought, in addition to damages for breach of contract, negligent misrepresentation and fraud, cancellation of the quitclaim deed and the quieting of title in Khazindar and Amin. No homestead had yet been recorded by Khazindar. In answering the complaint Khazindar did not assert a homestead interest, either recorded or statutory. The fact that Khazindar was contending she no longer had title did not mean the court was precluded from finding the transfers from Amin to Khazindar and then to Alhussieni had been fraudulent transfers. Once the jury returned its verdict finding Khazindar had breached her contract, committed negligent misrepresentations and committed fraud in the transaction by having her name placed on the blank quit claim deed, there was more than a distinct possibility that the transactions might be set aside. In the three weeks between the jury verdict and trial on the equity issues, Khazindar still did not record a homestead or attempt to amend her answer to assert a statutory homestead exemption should the trial court, sitting as a court of equity, determine the transaction should be set aside and thus determine Khazindar was still an owner.
Khazindar was not required to actually record a homestead under Code of Civil Procedure section 704.920. The assertion of the automatic homestead pursuant to Code of Civil Procedure section 704.720 would have sufficed. While the assertion of a homestead interest might have presented Khazindar with certain tactical problems, due to her assertion she had sold the property to Alhusseini, she was not legally barred from asserting what would have been an inconsistent defense. (See Lynch & Freytag v. Cooper (1990) 218 Cal.App.3d 603, 613, 267 Cal.Rptr. 189; South Santa Clara Valley Water Conservation Dist. v. Johnson (1964) 231 Cal. App.2d 388, 403, 41 Cal.Rptr. 846; Lewis Avenue Parent Teachers' Assn. v. Hussey (1967) 250 Cal.App.2d 232, 236, 58 Cal. Rptr. 499; 1 Schwing, Cal. Affirmative Defenses (2d ed.1996) § 1.3, pp. 14-16.) Prudence dictated that she do so.
In any event, because no homestead was recorded, an assertion of an automatic homestead interest would have required the court to make certain findings concerning the value of the property, the amount of the homestead, and whether the exemption even applied in the first place. Because the partition sale amounted to a "forced sale" under the homestead laws, these facts necessarily should have been litigated to arrive at a complete disposition *231 of all issues related to the property.[3] Because Khazindar did not raise the issue of a homestead at the time of trial, she is now barred from raising it.
Furthermore, the instant case is not the normal forced-sale situation where interests in the property have not been previously litigated and the homesteader may file a homestead declaration to defeat the otherwise legitimate claims of creditors to the extent permitted by homestead law. (See Putnam Sand & Gravel Co. v. Albers (1971) 14 Cal.App.3d 722, 725, 92 Cal.Rptr. 636.) Here, because of the existence of the prior equitable action where rights to the property were asserted, Khazindar should have asserted her residential homestead at that time. She cannot now try to hijack the forced sale of the property through recordation of a homestead when she should have raised this issue earlier. Lastly, the fact that both homesteads existed prior to the recordation of the abstract of judgment does not affect our analysis, since some form of homestead existed at the time of the partition action and should have been asserted so that the court could determine the priority of liens and an appropriate amount to be set aside for the homestead.

DISPOSITION
The order of the superior court is affirmed. Respondent is to recover costs on appeal.
We concur: PERLUSS, P.J., and WOODS, J.
NOTES
[*]   Judge of the Los Angeles Superior Court, assigned by the Chief Justice pursuant to article VI, section 6 of the California Constitution.
[1]  Subsequent to the filing of the original complaint, Amin asserted an additional claim for partition and sale of the property. The record does not indicate that an amended complaint was filed to state this claim; in any event, the pleadings may be amended to conform to proof at trial. (Code Civ. Proc, §§ 473, subd. (a)(1), 576; City of Stanton v. Cox (1989) 207 Cal.App.3d 1557, 1563, 255 Cal.Rptr. 682.)
[2]  The "automatic" homestead exemption is sometimes referred to as the "residential" exemption.
[3]  The existence of a cotenancy was not a bar to the partition action, as the right to partition depends on the nature of the property and how it is held. (5 Miller & Starr, Cal. Real Estate, supra, § 13.22 (3d ed.1996)).
