Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Grouping and Aggregation with Hibernate DS or Grails plugin

    Hi,

    I'd like to do something similar to this showcase example: http://www.smartclient.com/smartgwtee/showcase/#sql_dynamic_reporting, i.e. do grouping and aggregation while still leveraging advanced features such as pagination.
    Is there a simple way to achieve this using the hibernate connector or even the grails plugin (not the "plain" SQL connector)? Maybe by somehow modifying the Hibernate Criteria object from some custom DMI code?

    What license (Pro/Power) is required in these cases?

    Thanks

    #2
    Hibernate makes this much harder, and in some cases, not feasible. This is one of the key reasons we recommend the SQLDataSource. In fact, even if you've got Hibernate in place already, you might want to introduce a SQLDataSource in order to implement this kind of screen.

    But if you want to try via Hibernate, yes, you need to form a Hibernate Criteria object (with lots of attention to projections, eager vs lazy fetching, etc), and there is no API available to get the default Criteria object we generate - it would not actually be a usable starting point for a complex join anyway.

    To get going, the Custom DataSource samples show a very simplified version of the code we use to create Criteria objects for Hibernate.

    Forming and executing your own Hibernate Criteria objects in a DMI does not require any special license, just Pro.

    Comment


      #3
      OK, thanks for the info.
      Using the SQL DS as done in the Dynamic Reporting showcase example would require Power, correct?

      Regards,
      fatzopilot

      Comment


        #4
        Correct (due to the use of SQL Templating).

        Comment

        Working...
        X