Si-ierwin, J.
1 Section 3594 of the Code provides that “any person who has an interest in the matter in litigation, in the success of either of the parties to the action, or against both, may become a party to an action between other persons, either by joining the plaintiff in claiming what is sought by the petition, or by uniting with the defendant in resisting the claim of the plaintiff, or by demanding anything adversely to both the plaintiff and defendant.” To entitle the assignee to maintain his action as an intervener, it is quite clear and well established that he must bring himself within some one or more of the provisions of the statute above quoted. It is beyond dispute that *715lie liád an interest in the matter in litigation; for before filing His petition tbe entire interest of tbe plaintiff in tbe suit and in tbe claim on wbicb it was based bad been sold and transferred to him, so that be became tbe sole and only person' wbo bad an interest in tbe matter adverse to the defendant. It cannot logically be said that be was “demanding anything adversely to botb tbe plaintiff and the defendant,” because by express assignment all bis rights in tbe pending action became bis. In this respect the case differs from Dunham v. Greenbaum, 56 Iowa, 303, in which there was a general assignment for tbe benefit of creditors; and, after the assignment bad been made, tbe assignors, wbo were defendants in attachment suits wbicb bad been brought before tbe assignment, answered and filed a counterclaim for damages on tbe bond. Tbe assignee then intervened, claiming tbe damage by reason of tbe wrongful attachment. It was held that be might do so. So far as tbe opinion declares, there was no evidence of collusion between tbe assignors and tbe assignee, nor anything to show that tbe assignors were not claiming damages as against even tbe rights of tbe assignee, therefore it was properly held that bis interest in tbe matter involved was adverse to botb tbe plaintiffs and tbe defendants. In Stove Co. v. Bowers, 109 Iowa, 175, there was also a general assignment after attachment, and tbe assignee intervened and sued on tbe bond; and tbe assignor, tbe defendant in tbe attachment suits, also answered, set up a counterclaim on tbe bond, and joined tbe intervening assignee in tbe prayer for damages. It was held that be might do so, but tbe case is distinguishable from this, because tbe assignor there still retained a contingent interest in tbe property and rights be bad transferred, and it was to bis interest to assist in the prosecution of the claim on tbe bond, for by so doing be was enhancing tbe value of bis estate in tbe bands of his trustee, and at least might profit thereby. It is said tbe assignee was interested in tbe success of the plaintiff, and was therefore entitled to intervene, but tbe evident intent of tbe statute is to permit inter*716vention in such cases only when the record shows some interest'in the plaintiff. After the assignee had filed his petition of intervention, it appeared conclusively that the plaintiff no longer had a shadow of interest in the matter in litigation. We are of opinion that the assignee should have asked to be substituted as plaintiff, and that the court properly held that he could not intervene.
2 This action was pending when the bank was turned over to the receiver. No question seems to have been tried below involving the right to continue it in the plaintiff’s name, or involving the right of substitution. The only question which appears to have been before the court was that of the right of the assignee to intervene, and this motion only asked that the petition of intervention be dismissed; but the court, at the same time that he sustained the motion, dismissed the original petition. This we think was error. The statute expressly provides that “no action shall abate by the transfer of any interest therein during its pendency,” and, on the record presented to us, the original action should not have been dismissed. — Beversed.