Hi,
If you are working with a JPA project using Eclipse sometimes you need generators. But Eclipse JPA plug-in (Dali) complains about custom generators:
@GeneratedValue(generator = “foreign“)
@GenericGenerator(name = “foreign“, strategy = “foreign”, parameters = { @Parameter(name = “property”, value = “yourEntity”) })
No generator named “foreign” is defined in the persistence unit
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.
Great website, thank You !!
How does one fix this error without disabling it? I belive that error is put there with a reason.
Es una mierda de solución