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