1 Reply Latest reply on Jan 1, 2008 7:56 AM by damianharvey

    using setParameterList with the EntityManager query

    jrwsampson

      I need to be able to select with an IN query and a collection... something like this:

      createQuery("from Campaign campaign where campaign.advertiser in (:advertisers) order by advertiserId").setParameterList("advertisers", selectedAdvertisers)
      


      The EM doesn't support the setParameterList method. So instead I tried to create the query on an injected org.hibernate.Session object, but that generates the following exception:
      javax.resource.ResourceException: Transaction is not active:

      I am in a conversation, and the session object comes from this in components.xml:

       <factory name="session"
       scope="STATELESS"
       auto-create="true"
       value="#{entityManager.delegate}"/>
      


      Am I barking up the wrong tree here?