
763 N.W.2d 568 (2009)
Robert M. LINDSAY, Appellant,
v.
COTTINGHAM & BUTLER INSURANCE SERVICES, INC., Appellee.
No. 07-0861.
Supreme Court of Iowa.
March 27, 2009.
*569 Ted Breckenfelder, Davenport, for appellant.
Michael J. Shubatt and William N. Toomey of Fuerste, Carew, Coyle, Juergens & Sudmeier, P.C., Dubuque, for appellee.
WIGGINS, Justice.
An insurance brokerage firm provided its employee with a deferred compensation plan. The employee left his employment and began to work for another insurance brokerage firm. About fifteen months later, he began working at a third insurance brokerage firm, where he serviced clients of his original employer. When his original employer learned he was servicing its *570 clients, it stopped paying his deferred compensation pursuant to the noncompete provisions of the deferred compensation plan. The employee then brought a declaratory judgment action to require payment of his deferred compensation under the plan. The district court found that the deferred compensation plan is a top hat plan and subject to the Employee Retirement Income Security Act (ERISA). The court further found ERISA allows the employer to enforce the noncompete forfeiture provisions of the deferred compensation plan even if state law does not allow a forfeiture of benefits. Because we agree with the decision of the district court, we affirm its judgment.

I. Background Facts and Proceedings.
Cottingham & Butler (C & B) is an insurance brokerage firm that had employed Robert Lindsay to sell insurance. The firm's principal office is located in Dubuque, although Lindsay worked primarily out of Davenport.
Lindsay served as an account executive, also known as a producer, since he began working for the company on April 16, 1987. During his employment, C & B provided Lindsay with a deferred compensation plan. The plan states that deferred compensation is "in consideration of the Executive's past and future services."
Article I of the plan differentiates between the deferred compensation plan and the employment agreement.[1] Article II of the plan provided for one hundred and twenty months of deferred compensation. An employee's years of service determined the amount of benefits paid under the plan.
Article III of the plan allows for the forfeiture of benefits. This article relates to consulting services. The article states that for ten years after the executive's retirement from active service, the executive must be available to advise the company and must represent the company well to the clients and the community. The article also states the employee is not to compete with the company during the retirement period in any manner. The final provision of the article states, "[t]he Executive must comply with the provisions of this Article in order to be and remain eligible to receive the benefits provided under Article II." If the executive does not comply with the noncompete provisions, the board of the company can decide to suspend or terminate payments under the plan. The executive or the executive's beneficiary is allowed to request reconsideration, but the board's decision is final.
In 2000, during Lindsay's last annual review before he left the company, C & B deemed his work substandard. C & B reduced Lindsay's salary and benefits based on that evaluation. On June 4, 2001, Lindsay met with his employer for another review. After this meeting, Lindsay and C & B agreed to end the employment relationship. During that meeting, Lindsay and C & B discussed the severance package, the company car, the deferred compensation plan, and the use of his vacation time.
C & B also asked Lindsay whether he wanted the deferred compensation to start right away. If he accepted the payments immediately, his payments would be discounted under the plan because he had not yet turned fifty-five years of age. Lindsay declined to accept the payments immediately. Instead, he told C & B he would wait until he turned fifty-five to begin receiving his payments to avoid the discount that would occur had he taken the payments early. During the meeting, C & B explained that the company expected Lindsay *571 to comply with the noncompete provisions of the deferred compensation plan. Lindsay acknowledges this discussion.
Lindsay and C & B signed a severance agreement on June 18. In the severance agreement, C & B stated Lindsay was entitled to the deferred compensation "pursuant to the terms and provisions of such Plan." Lindsay officially ended his employment with C & B on July 4. After Lindsay left C & B, he worked in insurance sales at Anderson Wilkins Lowe from September 6, 2001, through October 10, 2002. On September 28, 2001, C & B advised him via a letter that he could be in violation of the deferred compensation agreement when he started working for the new insurance firm.
On May 1, 2002, Lindsay received a letter from C & B stating that he was due $233,333 over a ten-year span which worked out to a monthly payment of $1,944.45. Lindsay's deferred compensation payments were to begin on May 1, 2002. Lindsay received full deferred compensation payments from May 2002 through June 2005.
Lindsay began working for Trissel Graham & Toole Group Benefits Inc. as vice president and partner on October 11, 2002. Trissel is an insurance brokerage firm in competition with C & B. While working with Trissel, Lindsay worked directly with two of his former clients that had been with C & B, the City of Monmouth and East Moline Metals.
On June 9, 2005, when C & B learned of Lindsay's relationship with the City of Monmouth, C & B sent Lindsay a letter. In that letter, C & B stated it may choose to suspend or terminate the deferred compensation payments because of Lindsay's business relationship with the city. C & B also stated its intention to deduct $19,674 from the deferred compensation payments to account for the violation, but hoped to resolve the issue. It reduced its payments to Lindsay from $1,944.45 per month to $1,632.23.
In August 2005, C & B found out about Lindsay's East Moline Metals relationship. In a letter to Lindsay, C & B stated its intent to deduct more from the deferred compensation to account for losing East Moline Metals as a client. C & B then dropped the amount of its payments to Lindsay from $1,632.23 per month to $859.57. After February 2006, C & B stopped making any payments under the deferred compensation plan.
Lindsay filed a petition for declaratory judgment. The petition asked for a judgment establishing his deferred compensation benefits were nonforfeitable and requesting an order requiring C & B to pay the full amount of his benefits. C & B's answer asked for declaratory judgment in its favor establishing that it paid the deferred compensation benefits as required by the deferred compensation plan.
Lindsay filed a motion for summary judgment, which the court overruled. The matter proceeded to trial. The court found Lindsay violated the deferred compensation plan by soliciting and accepting clients of C & B. Despite this seemingly positive result for C & B, the court then concluded the noncompete provisions contained in the plan are unconscionable and unenforceable under Iowa law because the noncompete provisions do not contain any limits as to time and area.
Lindsay then filed a petition for supplemental relief asking for damages. C & B filed a rule 1.904(2) motion requesting the court to rule on the doctrine of preemption under ERISA, an argument the court failed to address in its original ruling.
The district court filed its ruling on C & B's 1.904(2) motion. In the ruling, the judge stated he did not have C & B's trial *572 brief before filing the initial ruling on the matter because the clerk of court did not forward it to him. The court noted C & B made the ERISA preemption argument in the trial brief. The court decided ERISA preempts the state common law the court used to determine the noncompete forfeiture provisions were unenforceable. The court further found under ERISA, the noncompete forfeiture provisions of the deferred compensation plan are enforceable. Therefore, the district court reversed its earlier decision and found in favor of C & B.
Lindsay appeals.

II. Issues.
Lindsay raises two issues on appeal: first, whether the district court erred in failing to grant Lindsay's motion for summary judgment; and second, whether the court erred in holding ERISA preempts state common law regarding the enforceability of the noncompete forfeiture provisions.

III. Whether the District Court Erred in Failing to Grant Lindsay's Motion for Summary Judgment.
Lindsay appeals the district court's denial of its motion for summary judgment. The denial of a motion for summary judgment is no longer appealable once the matter proceeds to a trial on the merits. Kiesau v. Bantz, 686 N.W.2d 164, 174 (Iowa 2004). After a trial on the merits, the denial of the motion for summary judgment merges with the trial on the merits. Id. Accordingly, we cannot consider the assignments of error relating to the denial of the motion for summary judgment. Therefore, the only issue we will consider in this appeal is whether the court erred in holding ERISA preempts state common law regarding the enforceability of the noncompete forfeiture provisions.

IV. Whether the Court Erred in Holding ERISA Preempts State Common Law.
A. Error Preservation. In his brief on appeal, Lindsay claims C & B failed to properly raise the ERISA issue in the district court; therefore, the district court should not have decided the issue. Lindsay's claim must fail. C & B raised the issue in the district court. In its resistance to Lindsay's motion for summary judgment, C & B raised the ERISA preemption issue. At trial, C & B introduced evidence that the deferred compensation plan was the type of plan governed by ERISA. Again, in its trial brief, filed prior to the court's initial ruling, C & B not only raised the preemption issue, but also briefed it. Finally, when the court did not rule on the ERISA issue, C & B filed a rule 1.904(2) motion requesting the court to rule on the ERISA issue. In his resistance to C & B's 1.904(2) motion, Lindsay did not claim that C & B did not raise the issue of preemption in the district court. For these reasons, the ERISA preemption issue was properly before the court.
B. Standard of Review. The parties disagree on the standard of review. Lindsay filed the case as a declaratory judgment action. To determine the standard of review of a declaratory judgment action, we have said:
Our review of actions for declaratory judgment depends upon how the action was tried to the district court. To determine the proper standard of review, we consider the "pleadings, relief sought, and nature of the case [to] determine whether a declaratory judgment action is legal or equitable." We also consider "whether the court ruled on evidentiary objections" as an important, although not dispositive, test of whether the case was tried in law or equity.
*573 Passehl Estate v. Passehl, 712 N.W.2d 408, 414 (Iowa 2006).
The relief requested in Lindsay's petition was for the court to declare that his benefits under the deferred compensation plan were nonforfeitable and determine an amount certain C & B had to pay him for those benefits. Counsel and the court discussed how this matter was being tried during the trial with the judge specifically inquiring as to whether this was an equity case. At trial, Lindsay's attorney declared this case to be "primarily a legal issue" to obtain a "ruling on legal construction of the contract." Lindsay's attorney wanted the court to make its decision as a matter of law. During the trial, the judge did entertain and rule on the evidentiary objections.
In a similar case, the plaintiff filed a petition for declaratory judgment seeking declaration of his contractual rights, monetary damages, and injunctive relief. Harrington v. Univ. of N. Iowa, 726 N.W.2d 363, 365 (Iowa 2007). In Harrington, even though the plaintiff requested injunctive relief, we found the plaintiff's request for injunctive relief was not dispositive on how the court tried the case. Our court determined the district court tried the case at law. Id. Our review of the pleadings, the colloquy between counsel and the court on how this case was to be tried, the rulings the court made on evidentiary objections, and the relevant case law demonstrate this matter was tried at law. We review cases tried at law for correction of errors at law. Id.
C. Analysis on the Merits. Congress passed ERISA intending to develop a body of federal substantive law regarding the rights and obligations of employee benefit plans. Amato v. Bernard, 618 F.2d 559, 567 (9th Cir.1980). Congress's purpose in doing so was to replace diverse state laws with a nationally uniform federal common law regulating employee benefit plans to encourage the growth of private employee benefit plans. Wolf v. Reliance Standard Life Ins. Co., 71 F.3d 444, 447 (1st Cir. 1995). To ensure uniformity in employment benefit plans, Congress declared the ERISA statutes "supersede any and all State laws insofar as they may now or hereafter relate to any employee benefit plan" covered by ERISA. 29 U.S.C. § 1144(a) (1999). Accordingly, if the deferred compensation plan is covered by ERISA, we must apply federal law rather than state law to determine if the plan's noncompete forfeiture provisions are enforceable.
The ERISA statutes apply to any employment benefit plan if "any employer engaged in commerce" establishes or maintains the plan. 29 U.S.C. § 1003(a)(1). An employee benefit plan includes an employee pension benefit plan. Id. § 1002(3). ERISA defines an "employee pension benefit plan" as "any plan ... maintained by an employer ... that ... results in a deferral of income by employees for periods extending to the termination of covered employment or beyond...." Id. § 1002(2)(A).
The undisputed evidence shows that C & B is "an employer engaged in commerce" and that it established and maintained the deferred compensation plan at issue in this case. Because the plan "result[ed] in a deferral of income" to Lindsay "to the termination of covered employment or beyond," the deferred compensation plan is covered by ERISA. Accordingly, ERISA preempts state common law regarding the enforceability of the noncompete forfeiture provisions of the plan. Clark v. Lauren Young Tire Ctr. Profit Sharing Trust, 816 F.2d 480, 481 (9th Cir.1987); Noell v. Am. Design, Inc., Profit Sharing Plan, 764 F.2d 827, 831 (11th Cir.1985); Hepple v. Roberts & Dybdahl, Inc., 622 F.2d 962, 965 (8th Cir.1980); *574 Bigda v. Fischbach Corp., 898 F.Supp. 1004, 1014-16 (S.D.N.Y.1995).
To determine the effect of ERISA on the forfeiture provisions in the plan, we must define the type of deferred benefit plan entered into between C & B and Lindsay. The district court found this plan to be a "top hat" plan. A top hat plan is "unfunded" and exists primarily to provide "deferred compensation" to a "select group of management or highly compensated employees." 29 U.S.C. § 1051(2); see Healy v. Rich Prods. Corp., 981 F.2d 68, 72 (2d Cir.1992). Substantial evidence supports the district court's finding.
ERISA's participation and vesting rules govern the nonforfeitability requirements of plans covered by ERISA. 29 U.S.C. § 1053. ERISA exempts top hat plans from its nonforfeitability protection. Id. § 1051(2). ERISA's failure to protect top hat plans from the forfeiture provisions contained in those plans allows a top hat plan to include enforceable noncompete forfeiture provisions even if these provisions are not enforceable under state law.[2]See Bigda, 898 F.Supp. at 1016 (holding New York law may prohibit noncompete forfeiture provisions, but ERISA statutes allow forfeiture of all deferred compensation benefits under noncompete forfeiture provisions in a top hat plan); see also Lojek v. Thomas, 716 F.2d 675, 678-79 (9th Cir.1983) (holding even though Idaho law does not permit the enforcement of noncompete clauses in employment contracts, ERISA statutes allow forfeiture of pension benefits in excess of ERISA's minimum vesting requirements in noncompete clauses), Clark, 816 F.2d at 481-82 (holding state law may prohibit noncompete forfeiture provisions, but ERISA preempts state law with regard to those clauses in an ERISA plan as to pension benefits). Consequently under ERISA, C & B's deferred compensation plan's noncompete forfeiture provisions are enforceable. Therefore, C & B is entitled to discontinue paying Lindsay his deferred compensation benefits if Lindsay violates the terms of the plan by competing with C & B.
The holding in Bigda, appears to be consistent with the federal common law prior to the enactment of ERISA. As one federal court noted, at common law
(t)he authorities ... generally draw a clear and obvious distinction between restraints on competitive employment in employment contracts and in pension plans. The strong weight of authority holds that forfeitures for engaging in subsequent competitive employment, included in pension retirement plans, are valid, even though unrestricted in time or geography. The reasoning behind this conclusion is that the forfeiture, unlike the restraint included in the employment contract, is not a prohibition on the employee's engaging in competitive work but is merely a denial of the right to participate in the retirement plan if he does so engage.
Golden v. Kentile Floors, Inc., 512 F.2d 838, 844 (5th Cir.1975) (citations omitted).
Therefore, the district court was correct in holding ERISA does not prohibit C & B's reduction of deferred compensation benefits to Lindsay.

V. Disposition.
We affirm the judgment of the district court holding Lindsay's benefit under the deferred compensation plan was forfeitable because ERISA allows such forfeiture and preempts any state law to the contrary.
AFFIRMED.
NOTES
[1]  Lindsay also had an employment contract containing noncompete provisions.
[2]  We are not deciding in this opinion whether Iowa law would find the noncompete forfeiture provisions of the deferred compensation plan unenforceable.
