0 Replies Latest reply on Jun 18, 2009 11:22 PM by David Thompson

    Seam 2.1.2 Problems with Oracle and composite keys

    David Thompson Newbie

      I just upgraded a project from 2.1.1 to 2.1.2 and I'm having problems with regards to the fix for JBSEAM-3032.

      I'm connecting to an Oracle database and the getCountEjbql function is trying to count composite keys instead of which results in a ORA-00907: missing right parenthesis error. I need it to count() instead.

      So reading the bug report, if I'm using Hibernate persistence it should be setting WILDCARDASCOUNTQUERYSUBJECT to true and then using the wildcard to do the count. However, its not. Instead I get the error.

      Here is my persistence.xml

         <persistence-unit name="invmi" transaction-type="JTA">
               <property name="hibernate.connection.provider_class"
                  value="org.safmt.hibernate.HibernateConnProvider" />
               <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
               <property name="hibernate.show_sql" value="true"/>
               <property name="hibernate.format_sql" value="true"/>
               <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>

      But the resulting Oracle query comes out as:

                  drawerdata0_.FIELD_NAME)) as col_0_0_ 
                  DRAWER_DATA_LOCS drawerdata0_

      Is there something I need to set to get the behavior of a wildcard count?

      Of course I can override the getCountEjbql function and it works--but I'd rather not do that for all my classes that have composite keys.