Civil Procedure Code 580b
Purchase Money Mortgage
580b. No deficiency judgment shall lie in any event after a sale of real property or an estate for years therein for failure of the purchaser to complete his or her 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 that real property or estate for years therein, 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 that 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 the real property or estate for years therein.