]
Emmanuel Bernard resolved EJB-307.
----------------------------------
Resolution: Duplicate
This is a dupe
Joined and secondary table cannot work together atm
Unable to create the table for a class extending a 2 tables mapped
abstract class
----------------------------------------------------------------------------------
Key: EJB-307
URL:
http://opensource.atlassian.com/projects/hibernate/browse/EJB-307
Project: Hibernate Entity Manager
Issue Type: Bug
Components: EntityManager
Affects Versions: 3.2.1
Environment: JBoss 4.2.0 GA, WinXP SP2, Only using javax.persistence annotations
Reporter: Brice LEPORINI
persistence.xml:
<properties>
<property name="hibernate.hbm2ddl.auto"
value="create-drop"/>
<property name="hibernate.show_sql" value="true" />
</properties>
One main abstract class mapped on 2 tables:
@Entity
@Table(name="T_CRI")
@SecondaryTable(name="T_CRI_FT",
pkJoinColumns=@PrimaryKeyJoinColumn(name="PK_IDCRI",
referencedColumnName="PK_IDCRI"))
@Inheritance(strategy=InheritanceType.JOINED)
public abstract class CriFt implements Cri,Identified {
[.......]
}
Deployment with schema export works fine...
Now let's create a new class extending this one:
@Entity
@Table(name="T_CRI_FT_MAINTENANCE")
public class CriFtMaintenance extends CriFt implements Serializable, Identified, Cri {
[......]
}
Now deployment throws an exception:
09:41:23,359 INFO [SessionFactoryImpl] building session factory
09:41:23,437 ERROR [AssertionFailure] an assertion failure occured (this may indicate a
bug in Hibernate, but is more likely due to unsafe use of the session)
org.hibernate.AssertionFailure: Table T_CRI_FT not found
If Inheritance strategy is anything else than JOINED, there is no problem.
Feel free to contact me in order to get more informations about environment.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: