Reputation: 389
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
Reputation: 1110
If I understand you correctly @josef-prochazka 's suggestion of using a formula would be what you need.
See also:
Upvotes: 1