Constant in Hibernate Mapping Files

Posted by bertolami on Stack Overflow See other posts from Stack Overflow or by bertolami
Published on 2010-06-18T10:52:02Z Indexed on 2010/06/18 10:53 UTC
Read the original article Hit count: 210

Filed under:

I would like to add a value object to a mapped class where one column is fixed depending of the class that contains the component. How can I do something like this?

<component name="aComponent">
  <property name="abc" column="cde"/>
  <property name="xyz" value="FIXED"/>
</component>

Unfortunatly, the value attribute does not exist. Is there another way to apply a constant value to property?

Thanks in advance.

© Stack Overflow or respective owner

Related posts about hibernate