Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-3207

Drools Persistence Should Not Rely on an Existing Named Query in "META-INF/orm.xml"

XMLWordPrintable

    • Low
    • 0
    • 0% 0%

      There is a named query "ProcessInstancesWaitingForEvent" that lives in a drools persistence jar under "META-INF/orm.xml".

      The problem is not even that the query is wrong ( org.hibernate.QueryException: cannot dereference scalar collection element.. ), but that majority of applications that sit on top of JPA rely on its own mappings, and hence this query either:

      1. Lost, since the custom "persistence.xml" will redefine the path to other mapping files

      2. Will result in "Duplicate query mapping" exception if defined in a custom mapping file ( http://opensource.atlassian.com/projects/hibernate/browse/HHH-4152 )

      Would be more logical not to depend that everyone knows to look inside "drools persistence jar", and to have an extensive documentation explaining "ProcessInstancesWaitingForEvent". It maybe hardcoded through @NamedQuery or just be available as an OPTIONAL file to use by Drools clients: e.g. "<mapping-file>META-INF/persistence/mapping/drools/drools-named-queries.xml</mapping-file>" ( and again: documented.. )

      /Anatoly

            kverlaen@redhat.com Kris Verlaenen
            Anat0ly Anatoly Polinsky (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 1 hour
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified