
232 Cal.App.3d 941 (1991)
283 Cal. Rptr. 823
UNION BANK, Plaintiff and Respondent,
v.
JOHN B. ANDERSON et al., Defendants and Appellants.
Docket No. F012652.
Court of Appeals of California, Fifth District.
July 25, 1991.
*943 COUNSEL
McCormick, Barstow, Sheppard, Wayte & Carruth, Oliver W. Wanger, Timothy Jones, Hoppin & Hoppin, Richard P. Hoppin, Calfee & Young, Kent N. Calfee and Christopher J. Konwinski for Defendants and Appellants.
Hefner, Stark & Marois, Theodore M. Marois, Dennis L. Viglione and John M. O'Connell for Plaintiff and Respondent.
[Opinion certified for partial publication.[*]]
OPINION
ARDAIZ, Acting P.J.
Plaintiff/respondent Union Bank secured a summary judgment against defendants/appellants John B. Anderson, Yolo Petroleum, Henry H. Stone, and H.H. Stone & Sons.[1] Defendants filed timely appeals.
On October 20, 1988, Union filed its first amended complaint for foreclosure of deeds of trust. The first cause of action alleged that Anderson and Stone defaulted on a January 5, 1976, promissory note in favor of Buttes Gas & Oil Co. (the Buttes Note) which was later acquired by Union. The second cause of action alleged that the Andersons, the Stones, and other individual defendants not parties to this appeal breached a written guarantee of the Buttes Note. The third cause of action alleged that the Andersons and Stones defaulted on a January 7, 1983, promissory note in favor of Union (the Union Note).
On November 18, 1988, the Stones filed their answer to the first amended complaint, including 13 affirmative defenses. On November 21, 1988, the Andersons filed their answer to the first amended complaint, including six affirmative defenses. On May 12, 1989, a stipulation was filed that the Stones "have no liability under the Third Cause of Action of the First Amended Complaint."
On May 15, 1989, Union filed its notice of motion for summary judgment or, alternatively, summary adjudication of issues, together with supporting materials. The defendants filed written opposition to the motion. The motion was heard on June 12, 1989, and June 15, 1989.
On June 15, 1989, the court granted summary judgment against Anderson and Stone on the first cause of action, Yolo and the Stone Partnership *944 on the second cause of action, and the Andersons on the third cause of action. On June 27, 1989, the court filed its written order granting summary judgment.
.... .... .... .... .... .... .... .[*]

FACTS

Purchase of SHF, Inc.
Before 1976, Buttes Gas & Oil Co. (Buttes) owned all the stock of Sam Hamburg Farms, Inc. (SHF, Inc.). SHF, Inc., a Los Banos area farming entity, owned approximately 6,200 acres of real property in Merced and Fresno Counties. It also leased land and owned farm equipment and motor vehicles. In 1975, Anderson and Stone negotiated with Buttes about buying SHF, Inc.'s 6,200 acres. Their purpose was to buy the land as an investment, farm it, then break it up and sell it.
Anderson, Stone, their agent, William Maddocks, and Buttes's President John Boreta agreed that the parties initially contemplated a purchase of SHF, Inc.'s land, not its stock. However, as of mid-1975, the parties had decided to structure the transaction as a stock purchase, to comply with Federal Bureau of Reclamation requirements. In July 1975, an attorney representing Anderson and Stone wrote the Department of the Interior that the transaction was strictly a stock acquisition.
On January 2, 1976, Anderson and Stone executed a written "Stock Purchase Agreement" to buy all the stock of SHF, Inc. Anderson and his children acquired 90 percent of the stock; Stone and his children acquired the remaining 10 percent. The corporate assets included the land, buildings, equipment, growing crops, and other assets. On January 5, 1976, Anderson and Stone executed a promissory note for $2,650,000 (Buttes Note), representing part of the purchase price. The Buttes Note was payable annually in 10 equal installments of $250,000 each and one final installment of $150,000, commencing January 5, 1977, with interest of 9 1/2 percent per year.
On January 5, 1976, SHF, Inc. executed a written guarantee of payment under the Buttes Note. Also, on January 5, 1976, SHF, Inc. executed two *945 second trust deeds on the SHF, Inc. real property to secure payment of the Buttes Note. The property was subject to two first trust deeds securing a March 15, 1972, promissory note in the amount of $2.9 million in favor of Connecticut Mutual. Despite the form of the transaction, the principals considered this to be a purchase-money transaction.
Anderson and Stone defaulted on the Buttes Note by failing to make principal payments due on January 5, 1984, 1985, and 1986. They also failed to pay all required interest. Union acquired the Buttes Note on August 30, 1985.
.... .... .... .... .... .... .... .[*]

I

Are There Triable Issues of Material Fact Concerning Whether the Deficiency Judgment Bar of Code of Civil Procedure Section 580b Applies to the Buttes Note?
The Buttes Note, in the amount of $2,650,000, was executed by Anderson and Stone in favor of Buttes as part of the transaction involving the "Stock Purchase Agreement" of January 2, 1976.
Anderson's sole argument as it relates to the first cause of action is that said action to recover on the Buttes Note is barred by Code of Civil Procedure section 580b.[7] Stone also raises the antideficiency bar as one of several possible defenses to the first cause of action.
(1) Section 580b was a part of the legislation in the field of secured transactions in real property spawned by the depression of the 1930's. (Cornelison v. Kornbluth (1975) 15 Cal.3d 590, 600 [125 Cal. Rptr. 557, 542 P.2d 981]; Note (1975) 12 Cal. Western L.Rev. 142.) At the time pertinent herein it stated, in relevant part:
"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 *946 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."
It is without question that section 580b bars deficiency judgments altogether on standard purchase money transactions. (Boyle v. Sweeney (1989) 207 Cal. App.3d 998, 1001 [255 Cal. Rptr. 153].) An acknowledged purpose of this section is to discourage vendors from overvaluing the security. Precarious land promotion schemes are discouraged as the security value of real property gives purchasers a clue as to its true market value. The primary purpose of this statute has been stated as follows: where inadequacy of the security results from a decline in property values during a general or local depression, the deficiency bar prevents the aggravation of the downturn that would result if defaulting purchasers lost the land and were also burdened with personal liability. (Cornelison v. Kornbluth, supra, 15 Cal.3d at 601; Roseleaf Corp. v. Chierighino (1963) 59 Cal.2d 35, 42[27 Cal. Rptr. 873, 378 P.2d 97]; Bargioni v. Hill (1963) 59 Cal.2d 121, 123 [28 Cal. Rptr. 321, 378 P.2d 593].) "[Section 580b], and the related sections passed at the same time, were intended to prevent creditors from buying in property for a nominal sum, after the debtor had defaulted, and then holding the defaulting debtor for a large deficiency judgment. [Citations.]" (Kerrigan v. Maloof (1950) 98 Cal. App.2d 605, 616 [221 P.2d 153].)
"`Section 580b was apparently drafted in contemplation of the standard purchase money mortgage transaction, in which the vendor of real property retains an interest in the land sold to secure payment of part of the purchase price. Variations on the standard are subject to 580b only if they come within the purpose of that section[,]'" as explicated in Roseleaf and Bargioni. (Spangler v. Memel (1972) 7 Cal.3d 603, 610-611 [102 Cal. Rptr. 807, 498 P.2d 1055], quoting Roseleaf Corp. v. Chierighino, supra, 59 Cal.2d at p. 41; Boyle v. Sweeney, supra, 207 Cal. App.3d at p. 1001.)
It appears both Anderson and Stone acknowledge the instant transaction could only fall within section 580b protection as a variation on the standard purchase money transaction. The question presented is whether a sale of all of the stock of an existing farming corporation, whose tangible assets consisted of real property, buildings, equipment, growing crops and other assets, secured by a note and attendant subordinate deeds of trust executed by the shareholders of the corporation on the corporation's real property, constitutes a variation on the standard purchase money transaction? Anderson maintains "[equitable] ownership of the real property was transferred" *947 and that "[i]n their analysis of CCP § 580b, the courts have repeatedly disregarded the form of the transaction to determine its true substance." Stone agrees and maintains "[t]he transaction was a real property purchase money transaction."
Anderson relies on Valinda Builders, Inc. v. Bissner (1964) 230 Cal. App.2d 106 [40 Cal. Rptr. 735]. There the two defendant-subdividers purchased a tract of land from Valinda, paying part of the purchase price and giving a note and deed of trust on the land for the balance. Valinda's trust deed was then subordinated to the security of a construction loan secured for the development of the land and construction of houses. Defendants later organized a corporation, Trend Homes, Inc., to take title; Trend executed a note and trust deed to Valinda. Trend was a nominal close corporation (paid-in capital of $200; defendants and their wives were the only stockholders, directors and officers) and had no working capital. When the venture failed and Valinda's subordinated security was rendered valueless, Valinda sued not on the contract of sale or note, but upon a provision of the contract of sale by which defendants guaranteed payment of the purchase money note. (Id. at pp. 107-109.)
The trial court held section 580b was not a bar to a personal judgment against the defendants and the appellate court reversed. Since the purchase agreement expressly contemplated formation of a partnership or corporation through which defendants would operate, and the corporation thereafter formed was a "mere shell," the "guaranty" of its obligation was a mere promise by defendants to pay their own debt. As the primary obligors, the defendants were entitled to the protection of section 580b. (Valinda Builders, Inc. v. Bissner, supra, 230 Cal. App.2d at p. 110.)
As the trial court noted Valinda is not on point. This is not a situation where the corporation (SHF, Inc.) is a mere alter ego of the defendants. It was a legitimate, preexisting, separate corporation, operated under the auspices of the Buttes Agricultural Division at the time of its sale to Anderson and Stone in 1976. Anderson and Stone bought stock which included more than the interest in the land. None of the cases cited by Anderson and Stone granting defaulting defendants protection under section 580b incorporates such circumstances, nor is such a situation provided for in the language of the statute. If the import of the parties' argument is that there was an understanding, implied or otherwise, at the time of the sale that section 580b would apply, no such defense has been raised by either party, nor does it appear that section 580b could be made applicable by an "implied understanding" between the parties to a sale of stock.
Prunty v. Bank of America (1974) 37 Cal. App.3d 430[112 Cal. Rptr. 370], LaForgia v. Kolsky (1987) 196 Cal. App.3d 1103 [242 Cal. Rptr. 282], Lucky *948 Investments, Inc. v. Adams (1960) 183 Cal. App.2d 462 [7 Cal. Rptr. 57] and BMP Property Development v. Melvin (1988) 198 Cal. App.3d 526 [243 Cal. Rptr. 715] are also cited as supportive of Anderson's position, but fall short in the analysis.
Prunty included construction loans within the definition of purchase money transactions, provided the funds were used for building the borrower's personal residence on real property already owned by him. (Prunty v. Bank of America, supra, 37 Cal. App.3d at p. 442.) Prunty arguably fell within section 580b following a 1963 amendment adding the protection afforded a "dwelling," and was likely aimed at eliminating the inequitable situation where the purchaser of real property with an existing house was protected by section 580b and the purchaser of real property who later built a house on the lot was not. (Note, op. cit. supra, 12 Cal. Western L.Rev. 142, 143.) In LaForgia, although the original loan for improvements was not a purchase money transaction, it was transmuted into the equivalent of a purchase money mortgage when the note was rewritten following a subsequent sale of the property to the defendant. (LaForgia v. Kolsky, supra, 196 Cal. App.3d at p. 1110.) Again, a sale of real property provided the basis for invocation of the section 580b bar. The cases are not on point.
The debt in Lucky Investments, Inc., was acknowledged at the outset to be a standard purchase money debt. There Lucky retained a first trust deed, then later agreed to subordinate its deed to a deed obtained by the lender of a subsequent purchaser. Lucky reconveyed and cancelled its deed to the original buyer and reissued notes in the amount of the remaining balance. The court held the seller's new notes were mere counterparts of the old. The nature of the debts remained unchanged and section 580b was a bar to a deficiency judgment. (Lucky Investments, Inc. v. Adams, supra, 183 Cal. App.2d at pp. 463, 466.) Finally, in BMP Property Development the seller exchanged its property with the buyers and also loaned the buyers $80,000 to cover cash-flow shortages and for other nonpurchase-money purposes. The court held it to be a purchase money loan that was necessary to the sale because the buyers could not have otherwise afforded the transaction. (BMP Property Development v. Melvin, supra, 198 Cal. App.3d at p. 531.)
In addition to most of the cases cited above, Stone cites Jackson v. Taylor (1969) 272 Cal. App.2d 1 [76 Cal. Rptr. 891], and Budget Realty, Inc. v. Hunter (1984) 157 Cal. App.3d 511 [204 Cal. Rptr. 48]. Again, neither is persuasive.
Extending the holding of the court in Lucky Investments, Inc., supra, 183 Cal. App.2d 462, Jackson held that if the debt was originally a purchase-money *949 debt, a subsequent grantee who assumes the loan (in the form of a new note and deed of trust) keeps the same antideficiency protection as the original purchaser. (Jackson v. Taylor, supra, 272 Cal. App.2d at p. 5.) Budget Realty, Inc., held that the mere presence of an unexercised subordination provision (wherein the seller agreed to subordinate its security to a construction loan) did not operate to take what was at the outset a standard purchase money transaction outside the protection of section 580b. (Budget Realty, Inc. v. Hunter, supra, 157 Cal. App.3d at pp. 512, 517.)
(2) Anderson and Stone's arguments and case authority fail under these facts. It is well recognized that a corporation is a legal entity having an existence separate from that of its shareholders. (Merco Constr. Engineers, Inc. v. Municipal Court (1978) 21 Cal.3d 724, 729 [147 Cal. Rptr. 631, 581 P.2d 636].) When shareholders purchase stock in a corporation, and the corporation includes certain holdings in real property, the shareholders do not acquire an ownership interest in the real property. A share is simply a unit of proprietary interest which the shareholder holds in the corporation. (Kohl v. Lilienthal (1889) 81 Cal. 378, 385 [22 P. 689]; Corp. Code, § 184.) That is, the shareholders are not the owners of corporate property; the whole title is in the corporation. (Barnett v. Lewis (1985) 170 Cal. App.3d 1079, 1088 [217 Cal. Rptr. 80]; Baker Divide Mining Co. v. Maxfield (1948) 83 Cal. App.2d 241, 248 [188 P.2d 538].) "The shareholders of a corporation do not have legal title to the assets or capital of the corporation, have no right to the possession thereof, may not transfer or assign the properties or assets of the corporation nor apply corporation funds to personal debts." (In re Mercantile Guaranty Co. (1968) 263 Cal. App.2d 346, 352 [69 Cal. Rptr. 361].) Even upon dissolution, the shareholder is not entitled to a proportionate share of the property held by the corporation, only the assets left after liabilities of the corporation are adequately provided for or paid. (Corp. Code, § 2004.)
While Stone is correct in his assertion that "[t]he factual situations in which purchase money transactions occur ... are limited only by the creative imaginations of the participants in real property sales," here there was no real property sale. Indeed, Anderson and Stone's then-attorney, during negotiations in 1975, acknowledged to the Department of the Interior that the transaction was "`strictly a stock acquisition....'"
(3) Parties to a sale of stock cannot simply disregard the corporate form of the acquisition, no matter what the "intent" of the parties to the sale might have been at one time. While Anderson and Stone may have initially negotiated to buy real property, eventually they knowingly purchased only the stock of SHF, Inc. As noted in Carpenter v. Kilgour (1965) 236 Cal. App.2d 651, 658-659 [46 Cal. Rptr. 115], "[w]e have been cited to no *950 case and know of none which extends the provisions of Code of Civil Procedure section 580b in respect of deficiency to personal property [deficiency judgment allowed on residence where lease provided it was severable from the land]."
Anderson and Stone specifically purchased all the outstanding shares of stock because it enabled them to retain federal water rights on all of the acreage, which a buy-up of the corporation (and acquisition of its real property) would not have provided. Simply put, they bought out the shares of a corporation. The corporation owned the property. Their note to Buttes was for the purchase of personal property (shares in the corporation). The fact that it may have been secured by real property does not render the transaction a purchase money transaction for real property. This is not a situation where they purchased the land from the corporation; they simply purchased all the shares of the corporation which owned the land. We conclude section 580b does not apply to the Buttes Note.
Summary judgment against Anderson was appropriate on the first cause of action. (§ 437c, subd. (c).) However, as we discuss in issue II, Stone has at least two viable defenses to the first cause of action. Therefore, Union is only entitled to summary adjudication on the issue of the applicability of section 580b as a defense to the Buttes Note as against Stone. (§ 437c, subd. (f).)

II-VIII[*]
.... .... .... .... .... .... .... .

DISPOSITION
Summary judgment as against Stone on the first cause of action (Buttes Note) is reversed, and the trial court is directed to enter only a summary adjudication on the issue of the application of section 580b to the Buttes Note as against Stone. Summary judgment on the second cause of action (guarantee) is reversed as to the only defendants such judgment was apparently entered against, to wit, Yolo and the Stone Partnership. Summary judgment on the third cause of action (Union Note) is reversed as to Yolo. The summary adjudication granted on the matter of the sum owed by Anderson on the Union Note is reversed for the reasons stated in issue VII. The award of attorneys' fees is reversed.
*951 In all other respects the summary judgment is affirmed. Each party is to bear his/its own costs on appeal.
Dibiaso, J., and Harris, J., concurred.
A petition for a rehearing was denied August 26, 1991.
NOTES
[*]   Pursuant to California Rules of Court, rules 976(b) and 976.1, this opinion is certified for partial publication. The portions directed to be published follow.
[1]  This opinion will refer to the parties as "Union," "Anderson," "Yolo," "Stone," and "Stone Partnership." "The Andersons" refers to Anderson and Yolo; "the Stones" means Stone and the Stone Partnership.
[*]   See footnote, ante, page 941.
[*]  All further statutory references are to the Code of Civil Procedure unless otherwise indicated.
