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

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

  •  08-07-2021
  •  | 
  •  

سؤال

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

هل كانت مفيدة؟

المحلول

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top