chanaka777
chanaka777

Reputation: 389

Map query results to property

Is there way to set results of a query to java DTO property using hibernate ?

Something like,

<hibernate-mapping>

<class name="myDTO" table="my_table">
    <property name="myProperty" query="what_i_need" />
</class>

<query name="what_i_need">
        <![CDATA[
        from    .....
        ]]>
</query>

</hibernate-mapping>

I'm using spring, hibernate, java.

Upvotes: 4

Views: 249

Answers (1)

Related Questions