Define a property called fullname in its class
Then in .hbm file, put a porperty like
<property name="fullName" formula="concat(FIRST_NAME,
LAST_NAME)"/>
Remember: FIRST_NAME and LAST_NAME are the database field name and not the class properties. Only two fields can be concatinated. No. of arguments mismatched exception may occur if more than two fields are concatinated.
No comments:
Post a Comment