How to configure the SmartClient DataSource with serverType Hibernate to select only the required fields?

StackOverflow https://stackoverflow.com/questions/12958495

  •  08-07-2021
  •  | 
  •  

Question

I'm working with SmartClient release 8.3.

I configured this DataSource:

    <DataSource ID="example"
                serverType="hibernate"
                dropExtraFields="true"
                beanClassName="com.msp.dao.entities.Status">
        <fields>
            <field name="id"/>
            <field name="name"/>
        </fields>
    </DataSource>

and I'm using ListGrid to view the results.

For some reason the HQL query that is being generated select the entire entity instead of the selected fields.

This is the generated HQL Query: select _status from com.msp.dao.entities.Status _status
I want it to be generated like that: select _status.id, _status.name from com.msp.dao.entities.Status _status

Thank you

Was it helpful?

Solution

You should use OperationBinding.outputs. But only from release 9 they will support it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top