The defendant the Casualty Company demurred to the amended complaint setting forth, in substance, the foregoing facts, for the following, among other, reasons: (1) Upon the ground that the undertaking of Hawley and the Casualty Company as surety, *Page 800 was to refund any amounts that the plaintiff would be compelled to pay to discharge any liens, and the right of action of the plaintiff to sue upon the bond cannot become effective until the plaintiff has paid something; and (2) that the amount that the job has cost the plaintiff to date does not exceed the amount that it agreed to pay, and therefore no cause of action exists against the defendant Hawley or the Casualty Company.
The court sustained the demurrer upon these two grounds and overruled it as to the remaining grounds; the plaintiff refused to plead further, and judgment was entered for the Casualty Company, and the plaintiff appealed, assigning as its reason of appeal the sustaining of this demurrer.
We will first consider whether the court correctly sustained the demurrer on the first ground. The complaint sets up that in the agreement of Hawley with the plaintiff of January 31st, 1921, Hawley "agreed to provide all the materials and perform all the work for the painting" of the hospital building in question for $10,100. The complaint also alleges that the bond of Hawley and the Casualty Company was conditioned for the faithful performance by Hawley of the contract of January 31st with the plaintiff, and that in September, 1921, Hawley abandoned the painting job and repudiated all the obligations of his contract, an obligation of which was "to provide all the materials and perform all the work for the painting" of the hospital building in question. The plaintiff correctly claims that the primary term of Hawley's agreement with the plaintiff is "to provide all the materials and perform all the work for the painting" of the building in question, and consequently that when, in September, 1921, Hawley ceased work on the painting, abandoned the job and repudiated the contract, he breached the contract *Page 801 and became liable for the breach; and since the bond was conditioned for the faithful performance by Hawley of his contract of January 31st, 1921, with the plaintiff, the breach of the contract by Hawley in September, 1921, created a cause of action on the bond against Hawley and the Casualty Company in favor of the plaintiff, the obligee, for whatever damages the plaintiff could equitably establish up to the time of a trial of the action, and in any event for nominal damages.New Haven v. Eastern Paving Brick Co.,78 Conn. 689, 698, 63 A. 517; Howe v. Grimes,211 Mass. 33, 36, 97 N.E. 371; Smith v. Whiting, 100 Mass. 122;Albany Dutch Church v. Vedder, 14 Wend. (N. Y.) 165; 9 Corpus Juris, 98.
There were certain further provisions in the Hawley agreement to the effect that should Hawley refuse or neglect to supply sufficient workmen or materials, the plaintiff should be at liberty to provide such labor or materials and deduct the cost thereof from money due or to become due Hawley; and that, there being sufficient ground for such action, the plaintiff might terminate Hawley's employment and complete the work; and that if the expense of completing the work should exceed the unpaid amount due under the agreement, Hawley should pay the difference to the plaintiff; and that Hawley should refund to plaintiff all moneys that plaintiff should be compelled to pay in discharging any claim or lien on the premises made obligatory in consequence of Hawley's default. These further provisions were clearly made to render certain various subordinate questions likely to arise in determining what the rights of the plaintiff would be in case of the breach of the primary agreement of Hawley to provide all the materials and perform all the work for painting the building in question. The Casualty Company in its demurrer selected one of these subordinate provisions relating to *Page 802 the possible discharge of liens by the plaintiff, and asserts in the first ground of demurrer, in substance, that Hawley's agreement with the plaintiff was merely to repay the plaintiff whatever it paid to discharge any liens on the building, and therefore that the agreement and the bond of the Casualty Company was not breached until the plaintiff paid something to discharge liens. If the question of the breach of Hawley's agreement with the plaintiff is to be determined from injury arising from breaches of the subordinate provisions in the agreement, it seems evident that it is obviously unsound and incorrect to select only one of the subordinate provisions of the agreement and make it the sole criterion of whether Hawley breached his contract. As stated above, the abandonment of the contract of January 31st by Hawley in September breached the primary obligation of the contract and hence also breached the bond. For the reasons stated, the court erred in sustaining the demurrer on the first ground.
The second ground of demurrer which the court sustained is that "the amount that the job has cost the plaintiff to date does not exceed the amount that he agreed to pay, and therefore no cause of action exists against the defendant Hawley or the Casualty Company."
This ground of demurrer is based on the claim that even if Hawley's abandonment of the work and his contract with the plaintiff is disclosed by the complaint, yet there can be no cause of action upon the breach assigned against him or against the Casualty Company on the bond, unless the plaintiff has alleged the actual payment upon the job of a sum in excess of what it agreed to pay Hawley. In an action against Hawley for the breach of his contract, or against the Casualty Company and Hawley on the bond in question, the *Page 803 plaintiff would be entitled in any event to a judgment for nominal damages. In its complaint in such an action the plaintiff was not required to minutely specify the extent of the damage suffered at the date of beginning the action. A good allegation of a breach and a general claim for damages, as in this complaint, makes a valid complaint. What more detailed statements as to damages a court might require on motion, does not affect the validity of the complaint. The court erred in sustaining the demurrer upon the first and second grounds.
We have examined the remaining grounds of demurrer to see if perchance any ground of demurrer was stated that would be fatal to the action against the Casualty Company, but we find none.
Under the privilege of uniting different causes of action, both legal and equitable, in the same complaint when presented as grounds of recovery upon claims arising out of the same transaction or transactions connected with the same subject of action, under General Statutes, § 5636, as construed in the case ofLewisohn v. Stoddard, 78 Conn. 575, 589, 63 A. 621, and under the relief permitted by our Declaratory Judgment Act, the aim sought by the plaintiff in this action can be carried out. The plaintiff seeks in this action to have its rights in relation to the fund held by the Hospital Society established by a determination of the rights of the lienors, and thereafter and consequent upon such determination, to have its rights against the Hospital Society and against the Casualty Company under the bond adjudicated. The allegations of the complaint show such relations between the plaintiff, the lienors, the Hospital Society, the Casualty Company, and Hawley, as to justify such determinations in one action and the consequent judgments for money relief. The causes of action alleged are as closely related, *Page 804 as growing out of related transactions, as the three causes of action held properly joined in Lewisohn v. Stoddard, 78 Conn. 575, 603, 63 A. 621. Each of the defendants either has an interest in the causes of action alleged, or is one whose presence is necessary for a complete determination and settlement of some question involved. General Statutes, § 5641; Lewisohn v.Stoddard, 78 Conn. 575, 604, 63 A. 621. In this action it is essential to the establishment and safeguarding of the rights of the plaintiff, that the court should determine and declare by an interlocutory declaratory judgment to what extent, if at all, the defendant Hodges Brother has a valid lien upon the property in question of the Hospital Society. Likewise as to the claimed lien of Merrels Whitfield, Incorporated. When these questions are determined, the legal consequences flowing from them will disclose what rights, if any, the plaintiff has to recover damages from the Hospital Society, and what damages, whether nominal or substantial, may equitably be recovered on the bond of Hawley and the Casualty Company. Among the rules of court made to carry out the Declaratory Judgment Act (Practice Book, 1922, p. 255), § 62(b) provides that the Superior Court will render declaratory judgments as to the existence or nonexistence of any fact upon which the existence or nonexistence of such right, power, privilege or immunity, does or may depend, whether such right, power, privilege or immunity now exists or will arise in the future. The court, with all the parties in interest before it, can have no difficulty in framing issues, which will result in the finding of the facts, the legal consequences arising from which will determine the legal relations which the plaintiff seeks to have declared. Our rules, § 63(a), provide that the Superior Court will not render declaratory judgments "upon the complaint of any person *Page 805 unless he has an interest legal or equitable by reason of danger of loss or of uncertainty as to his rights or other jural relations." The complaint discloses that the plaintiff is ignorant of its jural relations as to the defendants, because of its inability to determine without judicial aid the validity or amounts of certain claimed mechanic's liens on the Hospital property in question, and that upon the determination of these facts and the legal consequences flowing from them, the existence or nonexistence of rights of action against the Hospital Society and the Casualty Company, and the extent of the same, depend. The situation of the plaintiff, as appears by the amended complaint, discloses that it is in uncertainty as to its rights against the Hospital Society and the Casualty Company because of its ignorance of its legal relations to them, owing to the claimed liens above mentioned; and, further, that because of the condition precedent contained in the bond as to the time of beginning suit against the Casualty Company, it is in danger of loss. The plaintiff, therefore, has such an interest as § 63(a) of the rules requires in order to base a prayer for a declaratory judgment.
Furthermore, we are satisfied that the remedial purposes of our declaratory judgment statute and the rules thereunder, permit a party in the situation of the plaintiff to bring a complaint setting forth facts which show his interest under § 63(a) of the rules in having a declaratory judgment rendered, and permit the coupling with the prayer for a declaratory judgment prayers for consequential relief, the legal basis for which depends on the legal relations to be established in the declaratory judgment. These legal relations and the legal consequences which follow from them, may, after their declaration, be incorporated in the complaint and thereby furnish a sufficient basis for a judgment for *Page 806 consequential relief. In the case at bar the legal relations established by a declaratory judgment may disclose as a legal consequence: 1. That the plaintiff is entitled to consequential relief against the Hospital Society. 2. That it is entitled to such relief against the Casualty Company and Hawley only. 3. That it is entitled to such relief against the Hospital Society to some extent, and against the Casualty Company and Hawley to some extent; and judgments may be rendered accordingly. For a complete determination of the plaintiff's right to recover against the Hospital Society and the Casualty Company on the bond, an interlocutory adjudication, by a declaratory judgment, of the relations of the plaintiff, the lienors, and the Hospital Society, was necessary, and to this adjudication Hawley and the Casualty Company were proper parties. To quote from Lewisohn v. Stoddard,78 Conn. 575, 604, 63 A. 621: "It is true that the final judgment may go as to one cause of action against some or all of the defendants severally, and on another cause of action against some of them jointly. It is true that many separate and distinct issues may be closed between different parties and that separate trials may perhaps become necessary to determine them. But these are common incidents of suits where both legal and equitable relief are demanded from numerous parties, on account of different transactions connected with the same subject of action."
There is error, the judgment is set aside, and the case remanded to be proceeded with according to law.
In this opinion the other judges concurred.