Java Mailing List Archive

http://www.gg3721.com/

Home » Hibernate Issues List »

[hibernate-issues] [Hibernate-JIRA] Created: (ANN-762) @Columns
cannot contain @Formula

Anupam M (JIRA)

2008-08-11


Author LoginPost Reply
@Columns cannot contain @Formula
--------------------------------

          Key: ANN-762
          URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-762
        Project: Hibernate Annotations
      Issue Type: Improvement
  Affects Versions: 3.3.0.ga
       Reporter: Hontvári József
       Priority: Minor


You can use formula for mapping a composite user type in xml. For example in XML:

<property name="price" type="PriceType">
<column name="value" />
<formula>'USD'</formula>
</property>

This is not possible with Hibernate Annotations, because the @Columns annotation only accept @Column elements. Something like this should work:
@Type(name="PriceType")
@Columns(columns= {
@Column(name="theValue")
@Formula(value="USD")
})
Price price;

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

   

_______________________________________________
hibernate-issues mailing list
hibernate-issues@(protected)
https://lists.jboss.org/mailman/listinfo/hibernate-issues
©2008 gg3721.com - Jax Systems, LLC, U.S.A.