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

    using setParameterList with the EntityManager query

    Jaron Sampson Newbie

      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"

      Am I barking up the wrong tree here?