[jbosstools-issues] [JBoss JIRA] Reopened: (JBIDE-6050) Discriminator is needed when 'single-table-per-hierarchy' is used and a class has subclasses

Dmitry Geraskov (JIRA) jira-events at lists.jboss.org
Mon Mar 15 11:35:38 EDT 2010


     [ https://jira.jboss.org/jira/browse/JBIDE-6050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry Geraskov reopened JBIDE-6050:
------------------------------------

      Assignee: Dmitry Geraskov  (was: Jiri Peterka)


Should be fixed in 3.1.1 

> Discriminator is needed when 'single-table-per-hierarchy' is used and a class has subclasses
> --------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-6050
>                 URL: https://jira.jboss.org/jira/browse/JBIDE-6050
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: Hibernate
>    Affects Versions: 3.1.0.CR2
>            Reporter: Dmitry Geraskov
>            Assignee: Dmitry Geraskov
>             Fix For: 3.1.1
>
>
> 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/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list