simon.void wrote:
Is this problem, that the class is not an @Entity?
Seems that way. When i insert
Code:
@org.hibernate.annotations.GenericGenerator( name="hibernate-increment",strategy="increment")
in every @Entity-class that extends IdObject, the Id.generator hibernate-increment is found. But it would be really nice if that wouldn't be neccessary.
I tried to write the @GernericGenerator-Tag in an package-info.java file
Code:
@org.hibernate.annotations.GenericGenerator( name="hibernate-increment",strategy="increment")
package server.domainobjects;
which is located in the package where IdObject and all it's subclasses are in. Then i added this package to the AnnotatedConfiguration
Code:
annotationConfiguration.addPackage( "server.domainobjects" );
but this didn't work. Doing it in hibernate.cfg.xml via
<mapping package="server.domainobjects"/> didn't cut it either.
Am i missing something?