While voluntary abandonment of claims may be treated as a voluntary dismissal under CCP 1717(b)(2), allowing no prevailing party, the plaintiff must affirmatively demonstrate an intent to abandon the claims to obtain this treatment. Here, plaintiff did not formally abandon its equitable claims but simply didn’t ask for an advisory jury verdict on them and then didn’t seek the judge’s ruling on them after conclusion of the jury trial.. Because the plaintiff didn’t formally abandon the claims, the defendant had to prepare to defeat them at trial, and so should be treated as the prevailing party on those claims.