# No generator named "paymentableGenerator" is defined in the persistence unit

来源：急速科技  发布时间：2015-01-03  浏览次数：5713

No generator named "paymentableGenerator" is defined in the persistence unit

No generator named “paymentableGenerator” is defined in the persistence unit

@GeneratedValue(generator = "paymentableGenerator", strategy = GenerationType.AUTO)
@GenericGenerator(name = "paymentableGenerator", strategy = "assigned")

The solution, I don’t like it though, is

Window->Preferences->Java Persistence->JPA->Errors/Warnings->Queries and Generators and set level of “Generator is not defined in the persistence unit” to warning. You are ok now.