
128 Cal.App.3d 615 (1981)
180 Cal. Rptr. 342
HARRY R. SHEPHERD et al., Plaintiffs and Appellants,
v.
CECIL R. ROBINSON et al., Defendants and Appellants.
Docket No. 47974.
Court of Appeals of California, First District, Division Three.
December 30, 1981.
*619 COUNSEL
Donahue, Gallagher, Thomas & Woods and John F. Kraltzen for Plaintiffs and Appellants.
Frederic L. Harvey and William Edward Baugher for Defendants and Appellants.
*620 OPINION
ANELLO, J.[*]
This is an appeal from a summary judgment granting a sold out junior trust deed holder a deficiency judgment as to a portion of the amount due on the underlying note. All parties appeal. We reverse in part and affirm in part.
This action was commenced by the holders of a second deed of trust, Harry R. Shepherd and Elinor Shepherd, hereinafter "Shepherd." Shepherd was the original owner of the property in question and sold the property to the first purchasers, Dr. Henry Edington, Jr., Rosemary Edington, and Dr. William M. Jenkins, Jr., hereinafter collectively referred to as "Edington." Edington then transferred the property to the second purchasers, Cecil R. Robinson and Shirley J. Robinson, hereinafter "Robinson."
In 1969, Shepherd owned a certain piece of real estate commonly known as 2505, 2515, and 2525 10th Avenue, Oakland, California, consisting of 35 apartments in 3 buildings. In that year, Shepherd sold the buildings to Edington, taking a wrap-around deed of trust to secure payment of a note in the amount of $336,000. This deed of trust was subordinate to two existing deeds of trust on the property. The two senior liens were paid off in 1972, leaving Shepherd with a first deed of trust.
By this time, however, Edington was having trouble with the property, which did not generate enough income to cover loan payments, taxes, and maintenance. Edington regarded the property as a "monkey" on his back and commenced a search for someone to take over the property. If Edington was unable to find someone to take over the property, he intended to walk away from it and allow Shepherd to take back the property under the deed of trust.
In May or June of 1973, Edington began talking with Robinson regarding his possible purchase of the property. Robinson expected to be able to finance the property for about $250,000, and towards this end Edington approached Shepherd about the possibility of discounting the deed of trust, which at this point had an outstanding balance of $286,600.92. Shepherd indicated that he would accept $249,000 cash in full settlement of the note.
*621 Edington then struck a deal with Robinson whereby Robinson would be immediately granted a one-third interest in the property. The property would then be refinanced. Following refinancing, Edington would grant his remaining interest to Robinson, leaving Robinson as sole owner of the property. Edington was to receive no cash in this transaction. While Shepherd was aware that Robinson was being brought in as a coowner, there is a dispute among the parties as to whether Shepherd knew that Edington did not intend to remain a coowner of the property after refinancing was completed.
In September 1973 Robinson and Edington secured a financing commitment from Fidelity Savings and Loan Association (Fidelity) in the amount of $225,000. Shepherd agreed to accept $225,000 cash and a promissory note for $24,000 as full settlement of the 1969 deed of trust.
Edington, Robinson, and Shepherd continued negotiations. Cash was necessary to pay closing costs ($5,378.40) and to perform the termite work and roof repair ($4,436) that were conditions of the refinancing by Fidelity. Edington was delinquent in payments on the 1969 note ($9,800) and owed Shepherd $198.46 for tax payments.
Shepherd wanted to be paid for the delinquent note payments and the tax payment and added this amount ($9,998.46) to the previously negotiated price of $249,000, raising the price to $258,998.46. Edington and Robinson agreed to the higher price, and Shepherd agreed to accept less cash. While the evidence is unclear on this point, it appears that both Shepherd and Robinson deposited additional funds into escrow (a total of $15,167.74).
On October 9, 1973, Shepherd received $215,185.60 in cash and a promissory note secured by a second deed of trust on the subject property in the amount of $43,812.86 executed by Edington and Robinson.
In November 1973 Edington conveyed his interest to Robinson, in accordance with the original agreement between them. Shepherd expressed no concern about this conveyance at the time and made no effort to enforce the due-on-sale clause in the deed of trust.
On August 15, 1975, Fidelity caused its trustee to hold a trustee's sale under the power of sale contained in the deed of trust held by Fidelity. The property was sold for the amount then due on the note. The security for Shepherd's 1973 note was thus eliminated.
*622 As of August 1, 1975, the balance due by Robinson on the 1973 Shepherd note totalled $43,599.11.
In May 1977 Shepherd filed this action to recover the balance due on the 1973 promissory note, naming Edington and Robinson as defendants. Robinson filed a cross-complaint for indemnity against Edington and other parties not involved in this appeal.
Following discovery, Shepherd, Edington, and Robinson each filed a motion for summary judgment. The three motions were argued in December 1978, and the trial court granted judgment in favor of Shepherd against defendants in the sum of $19,599.11 plus interest from July 15, 1974, and granted judgment in favor of Edington and Robinson against Shepherd as to the remaining $24,000 due on the note. The court refused to award attorney's fees to either party, although the note sued upon provides that the prevailing party shall be entitled to attorney's fees.
Following the denial of each party's motion to set aside summary judgment, each party filed a notice of appeal in February 1979.
The parties agree that a deficiency judgment in this action is barred, if at all, by that portion of Code of Civil Procedure section 580b which reads as follows: "No deficiency judgment shall lie in any event after any sale of real property ... under a deed of trust, or mortgage, given to the vendor to secure payment of the balance of the purchase price of real property...."[1]
*623 (1) The operation of this clause has been held to be that under a purchase money debt owed to the vendor and secured by the property purchased, the security alone can be looked to for the recovery of the debt in the event of a default in payment. (Brown v. Jensen (1953) 41 Cal.2d 193, 198 [259 P.2d 425].) This rule holds true when the debt in question is a second deed of trust and the property has been foreclosed upon by the senior lienholder, leaving the security exhausted. (Ibid.; Jackson v. Taylor (1969) 272 Cal. App.2d 1, 6-7 [76 Cal. Rptr. 891].)
(2) The purpose of section 580b is twofold: to discourage vendors from overvaluing the security, and, in the event of a depression in land values, to prevent the aggravation of the downturn that would result if defaulting purchasers lost the land and were burdened with personal liability. (Roseleaf Corp. v. Chierighino (1963) 59 Cal.2d 35, 42 [27 Cal. Rptr. 873, 378 P.2d 97]; Spangler v. Memel (1972) 7 Cal.3d 603, 610-611 [102 Cal. Rptr. 807, 498 P.2d 1055]; United States v. Haddon Haciendas Co. (9th Cir.1976) 541 F.2d 777.)
(3) Shepherd contends initially that he was not a "vendor" with respect to the 1973 transaction, having sold his interest in the property to Edington in 1969, and that section 580b therefore does not apply. (See Kistler v. Vasi (1969) 71 Cal.2d 261, 262 [78 Cal. Rptr. 170, 455 P.2d 106].) "Vendor" has been liberally construed by the courts. Thus, even though Shepherd was not the legal owner of the property, Shepherd was a necessary party to the transfer of the property, and by "consenting to, and participating in the sale of the property to defendants, [the Shepherds] were vendors of their interest as beneficiaries under the original trust deed." (Jackson v. Taylor, supra, 272 Cal. App.2d at p. 6.) The note and trust deed was given to Shepherd as a necessary part of the purchase price of the property, making Shepherd a vendor with respect to the 1973 transaction.
Shepherd argues that since he agreed to cancel a first deed of trust and accept in its place a second deed of trust, section 580b should not apply. However, the fact that Shepherd was able to renegotiate the terms of the sale and secure a substantial amount of cash serves to support a conclusion that Shepherd was an active and necessary participant in the 1973 transaction and thus a vendor for purposes of section 580b.[2]
*624 (4) The debt secured by the 1973 Shepherd deed was a purchase money debt within the meaning of section 580b. The credit extended was "necessary to the consummation of the sale." (Bargioni v. Hill (1963) 59 Cal.2d 121, 123 [28 Cal. Rptr. 321, 378 P.2d 593].) Shepherd argues, however, that not all the sums represented by the note were "purchase money." This argument was accepted by the trial court, which held that the closing costs, the money for termite and roof repairs, and the back payments on the 1969 note and trust deed were not purchase money and thus not within the scope of section 580b. However, these costs were a necessary part of the purchase price and therefore were purchase money obligations. (Ibid.; Prunty v. Bank of America (1974) 37 Cal. App.3d 430 [112 Cal. Rptr. 370]; Union Bank v. Wendland (1976) 54 Cal. App.3d 393 [126 Cal. Rptr. 549].)
We note that the contract of sale does not allocate the consideration, and the debt is secured by a single note. "The contract provided solely for a note secured by a trust deed on certain real property. The real property was a portion of what was bought and sold by the parties for one indivisible price." (Gates v. Schuster (1964) 227 Cal. App.2d 287, 288 [38 Cal. Rptr. 644].) Closing costs and termite work are a normal incident to the sale of real property, as was the salesman's commission in Bargioni v. Hill, supra, 59 Cal.2d 121. If this sort of allocation of a single, indivisible debt were allowed, the effect of section 580b would be severely diluted, for virtually every sale of real property will involve costs of this nature.[3]
The cases on which Shepherd relies to support his argument for "fractionalization" fail to provide that support. While some cases have allowed recovery on notes issued in connection with a sale of real estate, these cases are merely applying the strict terms of the statute, which applies only to purchase money debts secured by the property purchased. (5) Thus deficiency judgments have been allowed on unsecured *625 notes given in connection with a sale of real property, even when that unsecured note actually represents a portion of the purchase price. (Christopherson v. Allen (1961) 190 Cal. App.2d 848, 852-853 [12 Cal. Rptr. 658]; Nevin v. Salk (1975) 45 Cal. App.3d 331, 342 [119 Cal. Rptr. 370]; Van Vleck Realty v. Gaunt (1967) 250 Cal. App.2d 81 [58 Cal. Rptr. 246]; Jonathan Manor, Inc. v. Artisan, Inc. (1967) 247 Cal. App.2d 651, 653 [56 Cal. Rptr. 14]; Childs v. Hunt (1970) 9 Cal. App.3d 276 [88 Cal. Rptr. 34].) Where the debt secured is not given in connection with the sale itself, that debt is recoverable. (Pike v. Tuttle (1971) 18 Cal. App.3d 746 [96 Cal. Rptr. 403] [additional loan to purchaser made by vendor after sale].) If the debt is secured by property other than the property purchased, that debt is collectible. (Roseleaf Corp. v. Chierighino, supra, 59 Cal.2d 35, 42; Syrek v. Gould (1966) 244 Cal. App.2d 149 [52 Cal. Rptr. 827]; Scott v. Fidelity Dev. Co. (1974) 39 Cal. App.3d 131 [113 Cal. Rptr. 855].)
Thus it is apparent that the 1973 note given to Shepherd comes within the scope of section 580b: it was given to the vendor, it was a purchase money debt, and it was secured by the property purchased. Shepherd argues, however, that he fits within one of the two exceptions to section 580b.
The first recognized exception, based upon a special relationship between the parties, does not apply and can be disposed of quickly. The operation of section 580b has been suspended where the underlying "sales" transaction is a dissolution of a marriage (Nickerman v. Ryan (1979) 93 Cal. App.3d 564 [155 Cal. Rptr. 830]) or the dissolution of a partnership (Comstock v. Fiorella (1968) 260 Cal. App.2d 262 [67 Cal. Rptr. 104]).
(6) The second major exception to section 580b involves a vendor who subordinates his deed of trust to a major construction loan on the property. (Lucky Investments, Inc. v. Adams (1960) 183 Cal. App.2d 462 [7 Cal. Rptr. 57]; Spangler v. Memel, supra, 7 Cal.3d 603, 611.) The rationale here is that a major change is anticipated in the use of the property, so that the vendor has no method of determining the future value of his security interest. To hold section 580b applicable in such a situation would force the vendor to subsidize and be subject to the business risks attendant on the development of the property. The purposes of section 580b, as enunciated in Roseleaf, supra, 59 Cal.2d 35, and Spangler, supra, 7 Cal.3d 603, would not be furthered. The vendor would retain a security interest in an unknown commodity. We *626 note that the rationale of the "construction loan" exception is not that the property is purchased for commercial purposes, but that a major change in the use and value of the property is anticipated.
This exception does not support a deficiency judgment in the case at bench. Here, Shepherd knew the value of the security, and the nature and use of that security has not changed. Shepherd's deed of trust was not subordinated to a construction loan.
(7) Shepherd also argues that the circumstances of the sale imply a waiver of section 580b protection. However, while a purchaser can waive section 580b protection in a transaction subsequent to the sale, that protection is not waivable in advance. (Russell v. Roberts (1974) 39 Cal. App.3d 390 [114 Cal. Rptr. 305].)
(8) Shepherd also argues that since Edington signed on the note and subsequently transferred his interest in the property, Edington stands in the position of a surety. While it is true that a surety or guarantor is not entitled to section 580b protection (Heckes v. Sapp (1964) 229 Cal. App.2d 549 [40 Cal. Rptr. 485]; Gottschalk v. Draper Companies (1972) 23 Cal. App.3d 828 [100 Cal. Rptr. 434]), it is also true that the agreement must evidence an intent to create a surety contract (Superior Wholesale Elec. Co. v. Cameron (1968) 264 Cal. App.2d 488, 493 [70 Cal. Rptr. 636]). No such intent is evidenced in the instant case. Generally speaking, there is no detriment to a party who signs on a purchase money deed of trust and takes title to the property. (Stone v. Lobsien (1952) 112 Cal. App.2d 750, 756 [247 P.2d 357]; Harper v. Heizer (1951) 103 Cal. App.2d 388, 390 [229 P.2d 828]; Brown v. Volz (1949) 90 Cal. App.2d 793 [204 P.2d 110]; Riesenfeld, California Legislation Curbing Deficiency Judgments, supra, 48 Cal.L.Rev. at pp. 718-719.)
(9) Finally, Shepherd argues that Edington's conduct in transferring his interest in the property to Robinson shortly after the refinancing was completed constitutes fraud, and that a deficiency judgment ought to be allowed on that basis. If Shepherd can make out a case of fraud against Edington, his proper remedy is an action for fraud, and a deficiency judgment will not lie. (American Sav. & Loan Assn. v. Leeds (1968) 68 Cal.2d 611 [68 Cal. Rptr. 453, 440 P.2d 933]; Snelson v. Ondulando Highlands Corp. (1970) 5 Cal. App.3d 243 [84 Cal. Rptr. 800, 85 Cal. Rptr. 806]; Glendale Fed. Sav. & Loan Assn. v. Marina View Heights Dev. Co. (1977) 66 Cal. App.3d 101 [135 Cal. Rptr. 802].) Similarly, Shepherd's allegation that Robinson allowed the property to *627 deteriorate, thus causing a loss in the value of security, does not justify a deficiency judgment. Shepherd's remedy is an action for waste. (Cornelison v. Kornbluth (1975) 15 Cal.3d 590 [125 Cal. Rptr. 557, 542 P.2d 981]; Krone v. Goff (1975) 53 Cal. App.3d 191 [127 Cal. Rptr. 390]; Hickman v. Mulder (1976) 58 Cal. App.3d 900 [130 Cal. Rptr. 304].)
In light of our conclusion that Shepherd is barred from obtaining a deficiency judgment by section 580b, it is clear that defendants Edington and Robinson are the prevailing parties for purposes of attorney's fees, as provided by the terms of the note. Therefore, it is unnecessary for us to determine the correctness of the trial court's refusal to award attorney's fees to either side, which we presume was based upon the fact that both parties "prevailed" to some extent on their claims. Under our decision herein, there is no question as to who "prevailed."
There are no triable issues of fact. Accordingly, the judgment is reversed to the extent that it grants a deficiency judgment to Shepherd on the 1973 note and deed of trust. The cause is remanded to the trial court for determination of the amount of attorney's fees and costs to be awarded defendants and for entry of judgment in favor of defendants. Robinson and Edington are awarded their costs on appeal.
Scott, Acting P.J., and Barry-Deal, J., concurred.
A petition for a rehearing was denied January 28, 1982, and the petition of plaintiffs and appellants for a hearing by the Supreme Court was denied March 24, 1982.
NOTES
[*]   Assigned by the Chairperson of the Judicial Council.
[1]  Code of Civil Procedure section 580b reads in full as follows: "No deficiency judgment shall lie in any event after any sale of real property for failure of the purchaser to complete his contract of sale, or under a deed of trust, or mortgage, given to the vendor to secure payment of the balance of the purchase price of real property, or under a deed of trust, or mortgage, on a dwelling for not more than four families given to a lender to secure repayment of a loan which was in fact used to pay all or part of the purchase price of such dwelling occupied, entirely or in part, by the purchaser.

"Where both a chattel mortgage and a deed of trust or mortgage have been given to secure payment of the balance of the combined purchase price of both real and personal property, no deficiency judgment shall lie at any time under any one thereof if no deficiency judgment would lie under the deed of trust or mortgage on real property."
For an overview of California antideficiency legislation, see Riesenfeld, California Legislation Curbing Deficiency Judgments (1960) 48 Cal.L.Rev. 705. For a review of the operation and scope of section 580b, see Hetland, Deficiency Judgment Limitations in California  A New Judicial Approach (1963) 51 Cal.L.Rev. 1, 2-28; Hetland, Real Property and Real Property Security: The Well-Being of the Law (1965) 53 Cal.L.Rev. 151, 159-165.
[2]  Shepherd's active participation in the sale is not what makes Shepherd a vendor for purposes of section 580b; this activity merely fails to insulate Shepherd from the effects of section 580b. If the second purchaser of the property had merely assumed the existing obligation, section 580b would operate to bar a deficiency judgment. (Barash v. Wood (1969) 3 Cal. App.3d 248 [83 Cal. Rptr. 153].) If the note had been cancelled and reissued in the same amount, section 580b would operate to bar a deficiency judgment. (Stockton Sav. & Loan Bank v. Massanet (1941) 18 Cal.2d 200 [114 P.2d 592].) We note also that Shepherd could have foreclosed under the 1969 deed of trust, but elected instead to assist a second purchaser (Robinson) to acquire the property. The fact that Shepherd chose to sell rather than foreclose supports our conclusion that Shepherd was a "vendor" with respect to the 1973 transaction.
[3]  The debt can be "fractionalized," but not when there is a single, unallocated price and a single note. See Leipziger, Deficiency Judgments in California: The Supreme Court Tries Again (1975) 22 UCLA L.Rev. 753, 812-819.
