2 Replies Latest reply on Nov 16, 2006 11:44 AM by falazar

    Hibernate and Web Console

    falazar Novice

      We are updating our web console display inbox that shows all the taskinstances available for a user, and have converted it into a datatable, and added sorting and paging.

      On the inbox we show the
      Process Name Task Name Process Initiator Task Start Date Task Due Date Task Variable Doc ID Task Variable URL

      What is the simplest way to create a Hibernate query to return all these fields, (in general) where it is joining across several tables.

      We first were using the internal findTaskInstances() which calls the Named Query: TaskMgmtSession.findTaskInstancesByActorId
      And then calling functions to get the other variables, saving all as a list of objects, and sorting. This was very ineffecient and slow.

      So I am looking for a way to use hibernate to return maybe a general generic object that we could contain all of these with.

      I looked at the Criteria package as well, but it seems to only return a single Class object.

      James

        • 1. Re: Hibernate and Web Console
          David Lloyd Master

          There's a few options. If you do an HQL query (and also I think Criteria, though I've never tested it myself) that selects multiple values, the return type is actually Object[] and all the values are returned in order.

          • 2. Re: Hibernate and Web Console
            falazar Novice

            Ok, yeah I attemtped to go through and use the SQL layer, but at that point oracle was joining 12+tables inside a subquery for the paging and sorting, and everything just starts to go nuts.

            Have you worked much yet on the Inbox display and trying to show multiple table fields there, and have it in a nice format such as paging results and sorting on all fields?

            I would like to help/receive your help for this task.

            We are working on several different areas of the web console now, and are creating a Panel bean, and looking at using the Tomahawk myfaces panel implementations to provide a nice clean display.

            James