Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-3712 Number of hbm generation bugs
  3. JBIDE-4198

Parametrized type should be exported with it's parameters

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Major Major
    • 3.1.0.M1
    • 3.1.0.M1
    • hibernate
    • None

      When Enum type (and in some other situations) used in mapping exported doesn't exxport property's type with params. In this situation session factory cannot be built.

      It does it in this way:
      <property ... type="org.hibernate.type.EnumType">

      but must does:

      <property ... >
      <type name="org.hibernate.type.EnumType">
      <param name="enumClass">com.jboss.dvd.seam.MyEnum</param>
      ...
      </type>
      </property>

      This is connected with JBIDE-4010, so step to reproduce from that issue:
      EXECUTE: Import Seam DVD Store Example project
      EXECUTE: Open Hibernate Configurations view
      EXECUTE: Expand Session Factory
      ASSERT: Expanded successfully w/o any exceptions. Classes with @Table annotations should be represented.
      EXECUTE: Open Hibernate Code Generation Configurations and create New Configuration
      EXECUTE: Select \dvdstore-ejb\ejbModule as Output directory
      EXECUTE: Swith to Exporters and select Hibernate XML mappings and Hibernate XML Configuration
      EXECUTE: Press Apply and Run button
      EXECUTE: Open Hibernate Configurations view
      EXECUTE: Edit configuration: Type: Core; Configuration file: \dvdstore-ejb\ejbModule\hibernate.cfg.xml; Property file: empty path. Press Ok button
      EXECUTE: Rebuild configuration
      ASSERT: Configuration should be rebuilded successfully.
      EXECUTE: Expand Session Factory
      FAULURE: Problems while creating sessionfactory:
      Log attached.

        1. patch.txt
          21 kB
          Dmitry Geraskov

              manderse@redhat.com Max Andersen
              dgeraskov Dmitry Geraskov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: