Hallo together,
using the annotation @EmbeddableSuperclass i get the following error message.
I would be really glad about help!
Hibernate version:
Hibernate3 RC1
Hibernate Annotations 3.1 beta 6
Code extracts:
Code:
import javax.persistence.*;
/**
* @archetype PartyPlaceThing
* generated code by ACG
*/
@EmbeddableSuperclass
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public abstract class _Wohnort
{
@Id(generate=GeneratorType.AUTO)
private int primaryKey;
.
.
.
.
}
Code:
package assocTest;
import javax.persistence.*;
@Entity(access = AccessType.FIELD)
public class Wohnort extends _Wohnort {
public Wohnort (){
super();
}
.
.
.
.
}
Full stack trace of any exception that occurs:
ERROR - could not complete schema update
org.hibernate.AnnotationException: No identifier specified for entity: assocTest.Wohnort
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:645)
at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:256)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:191)
at org.hibernate.cfg.Configuration.generateSchemaUpdateScript(Configuration.java:817)
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:144)
at main.HibernateUtil.<clinit>(HibernateUtil.java:36)
at testcases.AssocTestCase.setUp(AssocTestCase.java:82)
at junit.framework.TestCase.runBare(TestCase.java:125)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:474)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:342)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:194)
Initial SessionFactory creation failed.org.hibernate.AnnotationException: No identifier specified for entity: assocTest.Wohnort
INFO - cleaning up connection pool: jdbc:mysql://127.0.0.1/praktikum
INFO - duplicate import: assocTest.Wohnort->Wohnort
Regards,
Martin