This works for me (Eclipse Mars.1 Release 4.5.1)
Project / Properties / JPA / Errors/Warnings
Enable Project Specific Settings
Type
ID class must have a public no-arg constructor (change from Error to something else)
题
I'm using open-jpa and as we know it's shipped with enhancer which could create non private no-arg constructor during enhancement. It works, however eclipse have problem with it. It's quite rational that it doesn't know anything what would happen during ant build, so is there any possibility to turn off this particular error The Java class for mapped type ... must define a non-private zero-argument constructor
bounded to @Entity annotation?
解决方案
This works for me (Eclipse Mars.1 Release 4.5.1)
Project / Properties / JPA / Errors/Warnings
Enable Project Specific Settings
Type
ID class must have a public no-arg constructor (change from Error to something else)
其他提示
You can also simply create a non-private zero-arg constructor
for example:
public foo(){
super();
}