The state welfare commissioner, acting through his authorized deputy, brought a verified petition under § 17-324 of the General Statutes for an order by the Circuit Court directed to the defendant, described in the petition as the “successor trustee of said patient [Minnie Zungola] under the will of Carmine Zungola,” praying “for payment of such support as the Court shall find to be reasonably commensurate with the responsibility of such . . . [defendant] as provided in Section 17-295, and an order for payment of any arrearage.”1 The state claimed in the petition that at the *402billed rates, determined at the statutory rate (§ 17-295) “there is due and owing from said . . . [defendant] for the period June 1, 1962 through August 31,1966, the sum of $7,000.” The trial court found the issues for the plaintiff; accordingly, judgment was rendered for the plaintiff to recover of the defendant $7791.55 with interest from September 1,1966.
The object of this petition is to reach and appropriate the principal of the trust to expenditures made by the state for the support of an inmate of a state hospital for the insane. A principal question advanced by the state in its brief is “[w]hether or not the plaintiff is entitled to bill against the principal of a trust, set up in the will of Carmine Zungola, for the support of her daughter, Minnie, a patient at a state mental hospital.”
There is nothing in the verified petition which alleges the terms or the character of the trust created by the will of the settlor; the petition is in the usual printed form and makes reference only to §§ 17-324 and 17-295 of the G-eneral Statutes. But it is clear from the record that the state is not proceeding under § 17-324, but rather is attempting to proceed under § 52-321 (our spendthrift trust statute). Moreover, our construction of this sparse record is fortified by the citations in the state’s brief, which discusses and analyzes Foley v. Hastings, 107 Conn. 9, Reilly v. State, 119 Conn. 508, and Bridgeport v. Reilly, 133 Conn. 31 — all involving the construction and interpretation of § 52-321. And if we are correct that the whole course of the proceedings in this case hinged upon whether the testatrix intended to create a spendthrift trust under § 52-321, the burden was on the plaintiff to allege sufficient facts to bring itself within the terms of that statute. See Tuckel v. Argraves, 148 Conn. 355, 357.
*403The finding made by the trial court that a spendthrift trust was not created, being outside the issues framed in the petition, cannot support the judgment. “A judgment based upon facts found by the trial court but not involved in the issues raised by the pleadings, is erroneous and cannot be upheld. A failure to demur, or to object to the evidence offered to prove the facts found, does not preclude the losing party from asserting and taking advantage of the error on appeal.” Stein v. Coleman, 73 Conn. 524, 529; New Idea Pattern Co. v. Whelan, 75 Conn. 455, 458; Berman v. Kling, 81 Conn. 403, 405. “The verity of records and the conclusiveness of judgments alike require that the facts determined should be those only which are within the issues joined.” Greenthal v. Lincoln, Seyms & Co., 67 Conn. 372, 378; see McKenna v. Whipple, 97 Conn. 695, 702; Swist v. Swist, 107 Conn. 484, 488.
Since we conclude that the judgment is founded upon grounds outside the scope of the case as pleaded, it is unnecessary to consider the other alleged errors urged on this appeal.
There is error, the judgment is set aside and a new trial is ordered.
In this opinion Phuyn and Kosicki, Js., concurred.
Section 17-324 provides that the Circuit Court shall have authority to make and enforce orders directed to the conservator or guardian of any patient or person being supported by the state, wholly or in part, in a state humane institution, or the payee of social security or other benefits to which such patient or person is entitled. “The legal obligations and duties of a conservator are in some respects similar to those of a guardian.” Hamilton v. Pickett, 93 Conn. 34, 37. Quaere, whether the trustee of a testamentary trust is answerable in a proceeding under this statute.