
    William Brown, et al., v. The Galena Mining and Smelting Co., et al.
    
    1. Action on Injunction Bond, Brought Prematurely. In a suit brought for a perpetual injunction, a right of action does not accrue on an undertaking given on the issue of a temporary injunction, or restraining order,’ until a final judgment in the suit in which it was issued is# rendered; and a suit commenced on such undertaking, before such entry.of judgment, is prematurely brought, and cannot be maintained.
    2. Final Judgment, What is; Dismissal of Action. A final judgment is one which finally decides and disposes of the whole merits of the case, and reserves no further question, or direction, for the future or further action of the court. The voluntary dismissal by the plaintiff of the suit in which the injunction is issued, is a final determination of that suit, and determines the right to sue on the undertaking given on the issuing of a temporary injunction as effectually as a final judgment on a trial.
    3. --Practice. The objection that a petition does not state facts sufficient to constitute a cause of action, may be taken advantage of by a demurrer, or by an objection to the introduction of evidence on the trial.
    4. Pleadings Peíate to What Time. The pleadings all relate to the time of the commencement of the suit, the same as if filed at that time, and the rights of the parties are to be determined as they existed when suit was commenced.
    5. Amended Petition, Nature of. An amended petition in a suit stands in the place of and as a substitute for the original petition, which is superseded by it, and must be based on the facts, and causes of action, as they existed at the time the original petition was filed; and if a right of action did not exist when the original petition was filed, one cannot be created by filing an amended petition.
    
      Error from Bourbon District Court.
    
    The opinion states the nature of the action, and the material facts. Trial at the September Term, 1883, and judgment for costs against Brown and another, plaintiffs. They bring the case to this court.
    
      Blair' & Perry, PI. G. Webb, and C. O. Stochslager, for plaintiffs in error.
    
      L. P. Cunningham, and A. A. Harris, for defendants in error.
   The opinion of the court was delivered by

Hurd, J.:

On the 26th day of August, 1880, the Galena Mining and Smelting Company, defendant in error, commenced a suit in the district court of Cherokee county, to restrain the plaintiffs in error and two others from mining for mineral under the streets and alleys adjacent to a certain lot in the city of Galena, in Cherokee county, and caused a temporary order of injunction to be issued, and on the issuing of which, the defendants in error executed an undertaking as required by § 242, ch. 80, Comp. Laws. On the second day of December, 1880, the court, on motion of the plaintiff below, dissolved the injunction. On the 21st day of December, 1880, and while the original suit was pending, the plaintiffs commenced this action on that undertaking to recover damages claimed to have been sustained by reason of the issuing of this injunction. , The original suit was dismissed by the plaintiffs therein at some time after the commencement of this suit. After the dismissal, the plaintiffs herein amended their petition, showing among other matters the dismissal of that suit. The costs of the suit were paid, and no judgment other than for the dismissal of the suit was entered.

On the trial of this case in the district-court, the defendants objected to the introduction of evidence under the petition, for the reason that it did not state facts sufficient to constitute a cause of action. The court sustained the objection, and entered judgment against the plaintiffs for costs of suit. They filed their motion for a new trial, which was overruled,, and bring the case to this court by a petition in error, upon a case-made.

As against a petition that does not state a cause of action, the defendant has two remedies: He may demur, (Code, § 89;) or he may answer, and object to the introduction of evidence under it on the trial, (Code, § 91.)

.The objection to the petition was and is that this suit was commenced before the original suit was disposed of, and therefore prematurely brought, and that no right of action then existed. The defendants in error now contend that an action upon an undertaking given on the issuing of a temporary injunction cannot be maintained pending the suit in which it was granted.

The section of the statute under which the order was issued (Code, § 242) is as follows:

“Sec. 242. No injunction, unless otherwise provided by special statute, shall operate until the party obtaining the same shall give an undertaking, executed by one or more sufficient securities, to be approved by the clerk of the court granting such injunction, in an amount to be fixed by the court or judge allowing the same, to secure to the party injured the damages he may sustain, if it be-finally decided that the injunction ought not to have been granted.”

The purpose of such injunction is to maintain the status of the parties and the subject-matter of the litigation, to the end that the plaintiff may reap the full benefit of his suit, if the court shall, by its final judgment, determine that he is entitled to the relief demanded by his petition. The dissolution of the injunction by the court, or the abandonment of it by the party causing it to be issued while the suit is pending, has no effect upon the suit, which may proceed to trial and judgment in the same manner and with like effect as if such temporary injunction had not been dissolved. In a suit brought solely to obtain an injunction, the dissolution of the temporary injunction fixes no liability under the undertaking, nor does it determine the question whether the injunction ought, or ought not, to have been granted. The statute in effect is, that the obligors or sureties in the undertaking shall be liable for the damages sustained if it be finally decided that the injunction ought not to have been granted.” The final judgment in cases of this kind is the final decision which determines the question whether the injunction ought, or ought not, to have been granted, (Bemis v. Gannett, 8 Neb. 236,) and a final judgment is one which finally decides and disposes of the whole merits of the case, and reserves no further question or directions for the future judgment of the court. (Mills v. Hoag, 7 Paige Ch. 18; Code, §395.) If the court by the final judgment grants the relief demanded in the petition, it is the final decision that the temporary injunction was properly granted, and the undertaking given has served its purpose; but if the court, by its final judgment, decides that the plaintiff is not entitled to such relief, then it is finally decided that the injunction ought not to have been granted, and the liability of the obligors to it is fixed, and suit may be commenced and maintained for all damages sustained because of the issue of the injunction. If the theory that the dissolution of the injunction is a decision that the injunction ought not to have been granted, as contended for by the defendants, is the true theory, then a right of action accrues, and suit may be maintained upon the undertaking on the dissolution of the temporary injunction, no matter what may be the final result of the suit, and a judgment may be rendered on the undertaking, although the court, by its final decision, decides that the temporaxy injunction was properly granted. The final judgment in the original suit could not affect that x*ight to px’oeeed to judgment, if a right of action before existed. This dismissal of the suit by the plaintiffs, and the entry of jxxdgment of dismissal against them, was the final judgment in that suit, and determines the liability of the makers of the undertaking as effectually as would a judgment ’ upon an actual trial upon the merits.

We ai’e referred to the case of Duncan v. Lawrence, 1 Barb. 447. That case seems to hold adversely to the views herein expressed; bxxt, so far as we know, it is a case standing by itself, and is against the weight of authority upon the question.

.The plaintiffs in error contend that their amended petition, filed after the dismissal of the suit, shows that they had a right of action when that petition was filed, and therefore that they may recover under it. All the pleadings in a suit relate to the commencement of the suit, the same as if all were filed at that time, and the rights of the parties are to be determined as they existed at the time the suit was commenced.

An amended petition stands in the place of, and as a substi- ' tute fox1, the original petition, and must be based on the facts and causes of action as they existed when that petition was filed; and if no right of action then existed, one cannot be created by filing an amended petition stating matters and facts that have arisen since the commencement of the suit.

In a suit brought for the sole purpose of obtaining an injunction, we think there is no right of action, nor can a suit be maintained on an undertaking given on the issuing of a temporary injunction, until the final trial and judgment in the suit; and this suit having been commehced before the •final judgment in the original suit, was prematurely brought, and cannot be maintained.

The court below did not err in excluding evidence under the petition. Judgment affirmed.

Horton, C. J., concurring.

"Valentine, J.:

I concur in the decision of this case with some doubt. Section 242 of the civil code provides that when an injunction is granted it may have operation when an undertaking is given “to secure to the party injured the damages he may sustain if it be finally decided that the injunction ought not to have been granted.” The decision in this case is to the effect that where a temporary injunction has been granted and a proper undertaking given, and the injunction afterward dissolved, that still it has not been “finally decided that the injunction ought not to have been granted,” and that a final decision of such matter can take place only when the action itself is finally disposed of. The authorities apparently supporting this view of the case are as follows: Bemis v. Gannett, 8 Neb. 236; Gray v. Veirs, 33 Md. 159; Penny v. Holberg, 53 Miss. 567; Thompson v. McNair, 64 N. C. 448; Weeks v. Southwick, 12 How. Pr. 170; Dowling v. Polack, 18 Cal. 625, 629.

The authorities apparently adverse to this view of the case are as follows: Sizer v. Anthony, 22 Ark. 465; Tallahassee Rld. Co. v. Hayward, 4 Fla. 411; White v. Clay, 7 Leigh, 68; Duncan v. Lawrence, 1 Barb. 447.  