4

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.

chanaka777
  • 380
  • 1
  • 2
  • 10

1 Answers1

1

If I understand you correctly @josef-prochazka 's suggestion of using a formula would be what you need.

See also:

Friso
  • 1,080
  • 6
  • 37