[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5171) Allow usage of standalone @JoinFormula annotation

Sharath Reddy (JIRA) noreply at atlassian.com
Wed Apr 28 13:49:28 EDT 2010


Allow usage of standalone @JoinFormula annotation
-------------------------------------------------

                 Key: HHH-5171
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5171
             Project: Hibernate Core
          Issue Type: Improvement
          Components: annotations
    Affects Versions: 3.6
            Reporter: Sharath Reddy
            Assignee: Sharath Reddy
             Fix For: 3.6


If there is a single-column join (based on formula) between 2 entities, it is overkill to wrap the @JoinFormula within a @JoinColumnsOrFormulas annotation: 

@ManyToOne
@JoinColumnsOrFormulas(
{ @JoinColumnOrFormula(formula=@JoinFormula(value="SUBSTR(product_idnf, 1, 3)", referencedColumnName="product_idnf")) })

The above annotation is powerful, because it gives us the flexibility of using an arbitrary combination of columns and formulas for the join, but in this case it is redundant.
If would be easier to just specify like this:

@ManyToOne
@JoinFormula(value="SUBSTR(product_idnf, 1, 3)", referencedColumnName="product_idnf")) })

-- 
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

        


More information about the hibernate-issues mailing list