Add a MappingDefaults option allowing for multiple fields of the same 
Embeddable object in an entity
----------------------------------------------------------------------------------------------------

                 Key: OPENJPA-479
                 URL: https://issues.apache.org/jira/browse/OPENJPA-479
             Project: OpenJPA
          Issue Type: New Feature
            Reporter: Ron Pressler
            Priority: Minor


Currently, having multiple fields of the same Embeddable type in an entity 
requires the use of the AttributeOverride annotation, so that the column name 
of the different fields won't clash. This is tiresome.
It would be helpful to have a MappingDefault option that would prefix the 
embedded field's column name with the field name.
For example:

@Embeddable
class Em {
   int foo;
}

@Entity 
class En {
   Em first;
   Em second;
}

Would create table EN with columns FIRST_FOO, SECOND_FOO.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to