[hibernate-issues] [Hibernate-JIRA] Created: (ANN-806) Ability to have prefix embedded object columns

Thad Cox (JIRA) noreply at atlassian.com
Mon Feb 23 15:15:38 EST 2009


Ability to have prefix embedded object columns
----------------------------------------------

                 Key: ANN-806
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-806
             Project: Hibernate Annotations
          Issue Type: Improvement
    Affects Versions: 3.4.0.GA
            Reporter: Thad Cox


It would be very helpful if there were a way to specify a prefix for the column names of an embedded element as was suggested in the comments ANN-99.  By this I mean 

    @Embedded
    @ColumnPrefix("homeaddress")
    public Address getHomeAddress {
        return this.homeAddress;
    } 

The reasoning for rejecting the initial suggestion as put in the description of the issue made sense but the final solution of changing the naming strategy ends up being a very drastic solution for a simple problem.   The problem is that for some embedded objects that I only use once I want to just have the plain column name, other times I use it twice in the same object and I need the column names to have different prefixes.  

An additional problem the naming strategy solution presents is that if I specify the column name in the embedded object then I can't use it.  For example if I have an address object on a user and I want the postal code column to always end in "postal_code" instead of "postalcode" I can't use the naming strategy to add the prefix at all.



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