
211 Cal.App.3d 682 (1989)
259 Cal. Rptr. 570
WAYNE R. REINER et al., Plaintiffs and Respondents,
v.
MEHRY DANIAL, Defendant and Appellant.
Docket No. B028732.
Court of Appeals of California, Second District, Division Five.
June 20, 1989.
*685 COUNSEL
Wilbur E. Quint for Defendant and Appellant.
Irell & Manella, Gregory R. Smith and Peter J. Gregora for Plaintiffs and Respondents.
OPINION
ROWEN, J.[*]
Defendant, Mehry Danial (Danial), the owner of real property located in the Bel Air section of Los Angeles, appeals a judgment entered in favor of plaintiffs Don Searle, Jr. (Searle, Jr.), an adjacent landowner, and Wayne R. Reiner (Reiner), the prospective purchaser of Searle, Jr.'s interest. Plaintiffs instituted this action in order to determine the *686 enforceability of an agreement executed in 1951 prohibiting construction on Searle, Jr.'s property. We affirm the judgment finding the agreement unenforceable against plaintiffs.

FACTS
This dispute arises out of an agreement entered into in 1951 between two adjacent landowners, the Wrights (Lot 109) and the Crosses (Lot 110). In that year, the Wrights and the Crosses purchased, as tenants in common, an additional parcel of real property (Lot 92) that shared a common border with each of their lots. (See appendix for diagram of the location of the properties.) The Wrights and the Crosses then divided Lot 92 among themselves, executing deeds to each other for the portions of Lot 92 that were contiguous to their own respective parcels. Their agreement (the Wright-Cross Agreement) provided that no building or structure would be constructed on their respective portions of Lot 92 without the consent of the other. The Wright-Cross Agreement also provided at paragraph 4: "[T]his agreement shall be considered a covenant running with the land and shall be binding upon and inure to the benefit of the parties hereto, their heirs, executors, administrators, trustees or assigns." Although executed concurrently with the reciprocal deeds, the Wright-Cross Agreement was not recorded along with the deeds and neither of the two deeds made any reference to the Wright-Cross Agreement.[1] Rather, each deed transferred its respective portion of Lot 92 "subject to ... all conditions, restrictions, reservations, easements and rights of way of record."
In 1956 the Crosses sold their interest in both Lot 110 and Lot 92 to Don Searle, Sr. (Searle, Sr.), and his wife, Dorothy Searle. The deed to the Searles was recorded on September 25, 1956, and made no reference to the still unrecorded Wright-Cross Agreement. In 1963, the Searles sold Lot 110 to a third party but retained their ownership of their portion of Lot 92. Again, the deed transferring title in Lot 110 to the new third party owner made no mention of the Wright-Cross Agreement. In 1971, Searle, Sr., died and his interest in Lot 92 passed to Dorothy Searle. When Dorothy Searle died in 1984, her interest passed to her heirs as tenants in common in the following proportions: Don Searle, Jr., - 45 percent; Sally Clarke - 45 percent; Jeanette Adams - 10 percent. These parties were the current owners of record as of the date of the inception of this litigation.
Defendant Danial is the current owner of the contiguous lots previously owned by the Wrights, Lot 109 and the Wrights' portion of Lot 92. She purchased both lots in December 1977.
*687 At the heart of this dispute is that on October 18, 1977, 26 years after its execution and approximately 2 months before defendant Danial acquired her ownership interest in Lots 109 and 92, the Wright-Cross Agreement was recorded by an unknown party.
In March 1986, plaintiff Reiner entered into an agreement to purchase the portion of Lot 92 originally owned by the Crosses. The purchase agreement had been executed by Searle, Jr., and Jeanette Adams and Searle, Jr., had signed the purchase agreement on behalf of Sally Clarke pursuant to a power of attorney.
Reiner, in the course of investigating the property prior to purchase, had obtained an unexecuted version of the Wright-Cross Agreement from the local homeowners' association. Searle, Jr., had not been aware of the existence of the agreement when his father purchased the property and testified that he did not learn of the agreement until 1977. Neither Searle, Jr., the neighboring property owners, nor the homeowners' association knew whether the Wright-Cross Agreement had ever been executed. Because the Wright-Cross Agreement was recorded out of sequence with the chain of title, a preliminary title report obtained by Reiner in March 1986 did not reflect the existence of the Wright-Cross Agreement.
In light of his discovery of the restriction, Reiner approached defendant Danial for permission to construct on Lot 92. Danial refused to grant permission unless Reiner paid her the sum of $90,000. He refused and, together with Searle, Jr., instituted this action to determine the effect of the Wright-Cross Agreement. The purchase agreement, which contained a clause allowing Reiner to rescind should construction be ultimately prohibited, was executed and the parties entered into an extended escrow pending the outcome of the litigation.
The complaint sought: (1) a declaration that the Wright-Cross Agreement was invalid and was not binding on plaintiffs or their successors in interest, (2) to remove the Wright-Cross Agreement as a cloud upon the title of Lot 92, and (3) for injunctive relief preventing defendant from attempting to enforce the Wright-Cross Agreement.
After a trial without a jury, the trial court granted judgment in favor of plaintiffs on their causes of action for declaratory relief and to remove a cloud upon title, finding, inter alia, that: 1. The Wright-Cross Agreement was void against Don Searle, Sr., and Dorothy Searle because they were bona fide purchasers who acquired their portion of Lot 92 without notice of the Wright-Cross Agreement. Searle, Jr., as a successor to Searle, Sr.'s interest, had all of the rights of a bona fide purchaser.
*688 2. The Wright-Cross Agreement was a personal agreement between Wright and Cross and was not intended to be binding on the successor owners of Lot 92.
3. Even if Wright and Cross had intended the agreement to be binding, it did not meet the applicable legal requirements to be binding on successor owners either as a covenant running with the land or as an equitable servitude.
Defendant appeals this judgment.

ISSUES ON APPEAL
At the outset, defendant questions the standing of plaintiffs to bring this action, claiming that Reiner, as merely a prospective purchaser and not the owner of any interest in the properties, may not maintain this action. Defendant next claims that Searle, Jr., has no standing because his authority to execute the purchase agreement on behalf of Sally Clarke (a 45-percent interest holder) was not adequately proven and further, that he has suffered no damage since defendant Danial has offered to purchase Lot 92 from him for the same price to be paid by Reiner.
Defendant's principal contention, however, is that the Wright-Cross Agreement is either a covenant running with the land or an equitable servitude, prohibiting plaintiffs from constructing any buildings on Lot 92. Defendant contends the trial court erred in according plaintiffs the status of bona fide purchasers because (1) the doctrine may only be applied defensively in disputes over title, (2) the issue was not raised in plaintiffs' complaint, and (3) the evidence at trial showed that plaintiffs had actual knowledge of the Wright-Cross Agreement. Lastly, defendant Danial claims that the equities in this matter favor her position.

DISCUSSION

1. Standing of plaintiffs.


A. Both Reiner and Searle, Jr., are entitled to bring a declaratory relief action.

An action for declaratory relief is authorized by Code of Civil Procedure section 1060. (1) Such an action may be brought if a probable future controversy exists relating to the legal rights and duties of the parties. (Sherwyn v. Department of Social Services (1985) 173 Cal. App.3d 52, 58 [218 Cal. Rptr. 778]; Municipal Court v. Bloodgood (1982) 137 Cal. App.3d *689 29, 44 [186 Cal. Rptr. 807].) (2) Declaratory relief is an appropriate means to test the enforceability of covenants or servitudes asserted against property. The restriction need not be violated before initiating an action. (Ross v. Harootunian (1967) 257 Cal. App.2d 292, 294 [64 Cal. Rptr. 537].)
(3) In this instance, plaintiffs have executed a contract of sale and entered escrow. Aware of a possible prohibition against construction, plaintiffs made the closing of escrow contingent upon the right to construct. Plaintiffs are not urging a mere hypothetical situation upon this court for determination. Their position is clearly adverse to that maintained by defendant, and an actual controversy exists capable of definite and conclusive relief. (Sherwyn v. Department of Social Services, supra, 173 Cal. App.3d at p. 58.) Both plaintiffs clearly have standing to seek declaratory relief.

B. Both Reiner and Searle, Jr., are entitled to bring this action to remove a cloud from title.

(4) Actions to remove a cloud on title, under Civil Code section 3412,[2] differ from actions to quiet title in that they are aimed at a particular instrument or piece of evidence. (Wolfe v. Lipsy (1985) 163 Cal. App.3d 633, 638 [209 Cal. Rptr. 801].) (5) Searle, Jr., as owner of at least an undivided 45 percent interest, and Reiner as the owner of an equitable interest in the property (Miller v. Dyer (1942) 20 Cal.2d 526, 529 [127 P.2d 901, 141 A.L.R. 1428]), are entitled to bring an action against Danial to determine the validity of the Wright-Cross Agreement as it applies to them.[3] (5 Witkin, Cal. Procedure (3d ed. 1985) Pleading, § 619, pp. 75-76, §§ 623-624, pp. 80-81.)

2. Searle, Jr., succeeds to Searle, Sr.'s status as a bona fide purchaser.

(6) The doctrine of the "bona fide purchaser" can be generally described as follows: A purchaser or encumbrancer who pays valuable consideration for his interest in real property in good faith and who records his interest, receives his interest free and clear of all prior unrecorded claims in *690 the property which are unknown to him. (Civ. Code, §§ 1107, 1214, 1217;[4] 2 Miller & Starr, Current Law of Cal. Real Estate (1977) § 11:27, pp. 50-51; 4 Witkin, Summary of Cal. Law (9th ed. 1987) Real Property, §§ 205-209, pp. 411-414.)
Contrary to defendant Danial's contentions, a bona fide purchaser can assert his status affirmatively in actions to quiet title or remove a cloud from title and is not limited to pleading it as a defense. (Pettis v. General Tel. Co. (1967) 66 Cal.2d 503 [58 Cal. Rptr. 316, 426 P.2d 884]; Schut v. Doyle (1959) 168 Cal. App.2d 698 [336 P.2d 567]; Jones v. Independent Title (1944) 23 Cal.2d 859 [147 P.2d 542]; 54 Cal.Jur.3d, Real Estate Sales, § 325, p. 439.) (7) Reiner, as a party who has entered into an agreement to purchase real estate and who has entered into escrow, is entitled to assert this argument in his favor. (Schut v. Doyle, supra, 168 Cal. App.2d 698.)
(8) Nor is the doctrine limited solely to disputes over title. Civil Code section 1214, "embraces every instrument in writing by which any estate or interest in real property is created, aliened, mortgaged or encumbered, or by which the title to any real property may be affected, except wills." (Civ. Code, § 1215.) Restrictive covenants or equitable servitudes are voidable conveyances contemplated by this section. (Wayt v. Patee (1928) 205 Cal. 46, 53 [269 P. 660]; Sain v. Silvestre (1978) 78 Cal. App.3d 461, 475 [144 Cal. Rptr. 478], disapproved on other grounds in Reynolds Metals Co. v. Alperson (1979) 25 Cal.3d 124, 129 [158 Cal. Rptr. 1, 599 P.2d 83].)
(9) Only Searle, Sr.'s knowledge of the Wright-Cross Agreement at the time of his purchase from Wright is material to the status of plaintiffs' interests. Any knowledge Searle, Jr., or Reiner may have acquired later is irrelevant. (Rose v. Knapp (1957) 153 Cal. App.2d 379, 386 [314 P.2d 812]; Jones v. Independent Title, supra, 23 Cal.2d at p. 861.) As successors in interest to Searle, Sr., they receive the same protection against the Wright-Cross Agreement he acquired as a bona fide purchaser of the property. (Rose v. Knapp, supra, 153 Cal. App.2d at p. 386; Jones v. Independent Title, *691 supra at p. 861.) (10) Since the Wright-Cross Agreement was clearly not of record when Don Searle, Sr., purchased the property and there was no evidence that he knew of the agreement at that time, it could not be binding on him or his successor in interest, Searle, Jr.
(11) We find no merit in defendant Danial's claim that plaintiffs are barred from asserting the bona fide purchaser doctrine because they failed to plead it specifically in their complaint. The issues involved are determined from the facts alleged, rather than from the title of the pleading or from the character of damage recovery suggested in connection with the prayer for relief. (Johnson v. Tago (1986) 188 Cal. App.3d 507, 513 [233 Cal. Rptr. 503]; Code Civ. Proc., § 580.) The matter of pleading becomes unimportant since the case was fairly tried upon the merits and under circumstances which indicate that nothing in the pleadings misled defendant. (Johnson v. Tago, supra, 188 Cal. App.3d at p. 513.) Here, the complaint clearly alleged both the failure to record and the succession in interest of the lots in issue. In addition, the matter was clearly explored and discussed at the trial of the case. (Meritplan Ins. Co. v. Universal Underwriters Ins. Co. (1966) 247 Cal. App.2d 451, 460-461 [55 Cal. Rptr. 561].) Initially, plaintiffs' trial brief raised the issue and early on in the proceedings (cross-examination of Searle, Jr.), the trial judge indicated to counsel that he considered the bona fide purchaser theory to be an issue in the case. In fact, throughout the proceedings, the theory was raised and defendant's counsel was allowed to elicit evidence and make legal arguments in response thereto. Defendant's counsel did not manifest any surprise at the trial court's consideration of the issue, but instead indicated that he had clearly researched the doctrine and considered it inapplicable.

DISPOSITION
Based upon the evidence adduced at trial, we find no error in the trial court's ruling that the Wright-Cross Agreement did not bind Searle, Sr., a bona fide purchaser, nor does it bind Searle, Jr., or prospectively Reiner since they are or will be successors in interest to a bona fide purchaser and therefore have the same status. This finding makes consideration of defendant's other contentions on appeal unnecessary. For the reasons stated, we *692 affirm the trial court's holding. Defendant shall pay plaintiffs' costs on appeal.
Lucas, P.J., and Boren, J., concurred.
*693 
NOTES
[*]   Assigned by the Chairperson of the Judicial Council.
[1]  While the reciprocal deeds were dated January 9, 1951, the signatures were notarized on February 6, 1951, the same date that the signatures on the Wright-Cross Agreement were notarized.
[2]  Civil Code section 3412 provides that "A written instrument, in respect to which there is a reasonable apprehension that if left outstanding it may cause serious injury to a person against whom it is void or voidable, may, upon his application, be so adjudged, and ordered to be delivered up or canceled."
[3]  No mention was made in the record or on appeal of any attempts to join Jeanette Adams and Sally Clarke as parties or to call them as witnesses; at any rate, the judgment in favor of plaintiffs was correctly phrased to only bind parties before the court. (Kraus v. Willow Park Public Golf Course (1970) 73 Cal. App.3d 354, 370 [140 Cal. Rptr. 744].) Searle, Jr.'s ability to convey Sally Clarke's interest is not at issue, nor is the validity of the agreement to purchase.
[4]  Civil Code section 1107 provides that "Every grant of an estate in real property is conclusive against the grantor, also against everyone subsequently claiming under him, except a purchaser or encumbrancer who in good faith and for a valuable consideration acquires a title or lien by an instrument that is first duly recorded."

Civil Code section 1214 provides that "Every conveyance of real property ... is void as against any subsequent purchaser or mortgagee of the same property, or any part thereof, in good faith and for a valuable consideration, whose conveyance is first duly recorded...."
Civil Code section 1217 reads as follows: "An unrecorded instrument is valid as between the parties thereto and those who have notice thereof."
