
753 P.2d 825 (1988)
114 Idaho 89
STATE of Idaho, DEPARTMENT OF HEALTH AND WELFARE, ex rel., Justin Lee GAGE, Plaintiff-Respondent,
v.
Steven Leon ENGELBERT, Defendant-Appellant.
No. 16903.
Supreme Court of Idaho.
April 25, 1988.
Hamilton, Clark & Michaelson, Nampa, for defendant-appellant. Mark L. Clark, argued.
Jim Jones, Atty. Gen., and Deborah Kristal (argued), Deputy Atty. Gen., Boise, for plaintiff-respondent.
HUNTLEY, Justice.
The Department of Health and Welfare filed a complaint against Steven Engelbert, alleging that he was the natural father of Justin Gage and, therefore, liable for support for that minor child. The Department's complaint sought a determination of paternity under Title 7, chapter 11, of the Idaho Code. The version of I.C. § 7-1107 in effect when Justin was born, on May 5, 1979, provided that proceedings to establish paternity of a child must be commenced within three years of the date of birth.[1] The Department's complaint was filed in 1985. By that time, Justin was six years old.
Engelbert filed a motion to dismiss the complaint, asserting that it had not been timely filed. In its Memorandum Decision and Order, the trial court ruled that the version of I.C. § 7-1107 in effect in 1979 applied to any claims accruing prior to July 1, 1985. Accordingly, the court granted the motion to dismiss as to any support claim that had accrued up to three years *826 prior to the date the complaint was filed. However, the court further ruled that I.C. § 7-1107, as amended effective July 1, 1985, would apply to any claims accruing on or after its effective date. In sum, the court determined (a) that Engelbert could be held liable for child support for the three years immediately preceding the filing of the paternity action; and (b) that the right to collect support thereafter "accrues each month ... until the child reaches age eighteen (18)."
Following these determinations, the trial court granted the Department's motion for an order directing Engelbert to submit to a blood test for the purpose of determining whether he could be excluded from paternity of Justin. The blood tests established that the probability of Engelbert being the biological father of Gage was 98.34%.
Subsequent to the blood testing, the parties entered into a Stipulation, Order of Filiation and Judgment, in which Engelbert admitted that he is the natural father of Gage. The parties further stipulated that Engelbert was indebted to the Department for $3,500 in child support which the State had provided to Gage during the three years preceding this lawsuit. The Stipulation and Order further provided that, by signing the Stipulation, the parties did not waive their rights to appeal the court's Memorandum Decision and Order.
The sole issue presented in this appeal is whether the trial court should have granted Engelbert's motion to dismiss on the ground that the paternity action was time-barred by the applicable version of I.C. § 7-1107. While disagreeing with the court's rationale, we affirm its order. Where an order of a lower court is correct, but based upon an erroneous theory, the order will be affirmed upon the correct theory. Andre v. Morrow, 106 Idaho 455, 680 P.2d 1355 (1984).
The trial court correctly identified the version of I.C. § 7-1107 in effect in 1979 as the statute applicable to this case. The statute of limitations in effect when the right of action is deemed to accrue defines the statutory period unless the legislature provides otherwise. Stoner v. Carr, 97 Idaho 641, 550 P.2d 259 (1976).
The trial court then considered whether it should apply I.C. § 5-230 to I.C. § 7-1107, which would toll the three-year-statute for a period up to six years. Idaho Code § 5-230 states:
Persons under disabilities  Other than for real property.  If a person entitled to bring an action, other than for the recovery of real property, be, at the time the cause of action accrued, either:
1. Within the age of majority; or
2. Insane; or
3. Imprisoned on a criminal charge, or in execution under the sentence of a criminal court for a term less than for life; the time of such disability is not a part of the time limited for the commencement of an action provided, however, that the time limited for the commencement of an action shall not be tolled for a period of more than six (6) years on account of minority, incompetency, a defendant's absence from the jurisdiction, any legal disability or for other cause or reason except as specifically provided in section 5-213, Idaho Code. (Emphasis added).[2]
The court held that the Department was not entitled to the benefit of tolling under I.C. § 5-230 because it was not a "person" under disability of minority. However, while the trial court was literally correct that a state agency is not a "person," it does not follow that the statute is inapplicable.
In order to secure future child support for Gage, as well as to recover past expenditures of public assistance for the child, the Department brought the action ex rel. (ex relatione)[3] Justin Gage against *827 Steven Engelbert pursuant to the following Idaho statutes:
32-1002. Reciprocal duties of support.  It is the duty of the father, the mother and the child or children of any poor person who is unable to maintain himself or herself by work, to maintain such poor person to the extent of his or her ability. Whenver any person shall apply for aid to any county within this state under its indigent laws, and it shall at any time appear to the county commissioners that said poor person has a father, mother, child or children who is able to maintain him or her, but fails so to do, it shall be the duty of the said commissioners to furnish all necessary aid and to bring a civil suit against such father, mother, child or children to recover the amount so expended, in the name of the county. ...
7-1110. Proceedings  By whom brought.  Proceedings to establish the paternity of the child and to compel support under this act may be commenced by the mother, whether a minor or not, or by the child's guardian or other person standing in a paternal relation or being the next of kin of the child, or by the state of Idaho on behalf of a child for whom aid has been given. (Emphases added).
The Department's authority to pursue this action is found in Title 56, chapter 2, Public Assistance Law. Specifically, the authority for the Department to enforce child support is found in I.C. § 56-203A; and, further, the Department is subrogated to the rights of the child, in order that it may be reimbursed for child support, as provided in I.C. § 56-203B:
Payment of public assistance for child constitutes debt to department by natural or adoptive parents  Limitations  Department subrogated to rights.  Any payment of public assistance money made to or for the benefit of any dependent child or children creates a debt due or owing to the department by the natural or adoptive parent or parents who are responsible for support of such children in an amount equal to the amount of public assistance money so paid... .

The department shall be subrogated to the right of said child or children or person having the care, custody and control of said child or children to prosecute or maintain any support action existing under the laws of the state of Idaho to obtain reimbursement of moneys thus expended. If a district court order enters judgment for an amount of support to be paid by an obligor parent, the department shall be subrogated to the debt created by such order, and said money judgment shall be deemed to be in favor of the department. This subrogation shall specifically be applicable to temporary spouse support orders, family maintenance orders and alimony orders up to the amount paid by the department in public assistance moneys to or for the benefit of a dependent child or children but allocated to the benefit of the said children on the basis of providing necessities for the caretaker of said children... . (Emphasis added).[4]
Thus, although the Department is not literally a "person" under disability of minority, it is still subrogated to the rights of the child  including the right to have the *828 limitation period in I.C. § 7-1107 tolled by I.C. § 5-230. The Department's statutory right to subrogation is clear and specific under I.C. § 56-203B. Further, the policy considerations are particularly commanding, as Idaho has a compelling interest in assuring that the primary obligation for the support of illegitimate children falls upon the natural parents rather than upon the taxpayers of this state. See, State v. Wood, 89 Wash.2d 97, 569 P.2d 1148 (1977) (overruled on other grounds in S.W. Wash. Ch., Nat. Elec. Cont. v. Pierce Cty., 100 Wash.2d 109, 667 P.2d 1092 (1983)).
This Court has long recognized the legal concept of subrogation. Equitable subrogation is a legal device which allows one party to "step into the shoes of another." Thus, subrogation allows for a complete substitution of the rights and interests of one party to another. However, a subrogee has no greater rights than those possessed by the subrogor, and he is subject to the same burdens and limitations. Intern. Equip. Serv. v. Pocatello Indus. Park, 107 Idaho 1116, 695 P.2d 1255 (1985).
We see no reason why the State may not enjoy the same rights, via subrogation, as Justin Gage enjoyed. Since Gage was six years old at the time this action was commenced, the Department, ex rel. Gage, timely filed its complaint, because the tolling effect of I.C. § 5-230 (six years), when applied to the applicable version of I.C. § 7-1107 (three years), gave the State nine years from the date of Gage's birth within which to bring this action. Because we conclude that the Department's complaint was timely filed, we need not consider whether the statutory time periods are subject to any constitutional challenge.
Judgment affirmed; costs to respondent, no attorney fees awarded.
BAKES and BISTLINE, JJ., and McFADDEN and BURNETT, JJ. Pro Tem., concur.
NOTES
[1]  In 1979, I.C. § 7-1107 (effective 1969) read as follows:

Limitation of action.  Proceedings to establish the paternity of the child may be instituted only after the birth of the child, and such birth shall commence the time within which proceedings may be instituted as provided in section 5-218.1, Idaho Code, unless paternity has been acknowledged by the defendant in writing, in which case no action shall be brought after a lapse of more than five (5) years from the date of the acknowledgment.
The pertinent part of I.C. § 5-218(1) states that "an action upon a liability created by statute" must be brought within three years.
In 1985, the legislature amended I.C. § 7-1107 to allow a paternity action to be commenced anytime before the child reaches the age of majority (effective July 1, 1985). In 1986, the legislature further amended I.C. § 7-1107 specifically to make it retroactive (effective July 1, 1986).
[2]  Idaho Code § 5-230 was amended in 1985 to clarify subsection (1):

1. Under the age of majority; or... . (Emphasis added).
[3]  Black's Law Dictionary (5th Ed.) defines ex relatione as follows:

Legal proceedings which are instituted by the attorney general (or other proper person) in the name and behalf of the state, but on the information and at the instigation of an individual who has a private interest in the matter, are said to be taken "on the relation" (ex relatione) of such person, who is called the "relator."
[4]  The subrogation right delineated in I.C. § 56-203B is supplemented by I.C. § 56-203C, which reads in pertinent part:

Powers of department.  In order to carry out its responsibilities imposed under this chapter, the state department of health and welfare, through the attorney general or the respective county prosecuting attorney, or through private counsel is hereby authorized to:
(1) Represent a dependent child or dependent children on whose behalf public assistance is being provided in obtaining any support order necessary to provide for his or their needs or to enforce any such order previously entered... .
(5) Initiate any civil proceedings deemed necessary by the department to secure reimbursement from the parent or parents of minor dependent children for all moneys expended by the state in providing assistance or services to said children... .
