[
https://jira.jboss.org/browse/JBIDE-6050?page=com.atlassian.jira.plugin.s...
]
Jiri Peterka closed JBIDE-6050.
-------------------------------
Verified as described in JBDS Version: 3.0.1.v201005241821R-H78-GA, Linux 64, JDK 1.6
Discriminator is needed when 'single-table-per-hierarchy' is
used and a class has subclasses
--------------------------------------------------------------------------------------------
Key: JBIDE-6050
URL:
https://jira.jboss.org/browse/JBIDE-6050
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: Hibernate
Affects Versions: 3.1.0.CR2
Reporter: Dmitry Geraskov
Assignee: Jiri Peterka
Fix For: 3.1.1, 3.2.next
Attachments: JBIDE-6040_6050_JBIDE-6052.patch
1. Create parent class
2. Create it's subclass
3. run new hibernate mapping wizard
4. create console configuration based on the generated files
5. open session factory:
Observe the exception below
org.hibernate.MappingException: No discriminator found for
com.pnx.model.hibernate.Person. Discriminator is needed when
'single-table-per-hierarchy' is used and a class has subclasses
at org.hibernate.mapping.SingleTableSubclass.validate(SingleTableSubclass.java:64)
at org.hibernate.cfg.Configuration.validate(Configuration.java:1149)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1334)
at org.hibernate.console.ConsoleConfiguration$4.execute(ConsoleConfiguration.java:554)
at
org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:98)
at
org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:549)
at
org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:43)
at
org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:100)
at
org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:106)
at
org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:234)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira