[hibernate-issues] [Hibernate-JIRA] Commented: (ANN-489) add @AttributeOverride with formula support

Patrice Gervais (JIRA) noreply at atlassian.com
Fri May 22 07:51:13 EDT 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33235#action_33235 ] 

Patrice Gervais commented on ANN-489:
-------------------------------------

It would be useful when a persistent object contains multiple copies of the same embeddable object that contains a formula. In that case, the formula is replicated for each embedded object but they all refer to the columns which causes a problem when the embedded object is nullable. To be null all the fields of an embedded object must be null but if the default formula does not return null the overriden embedded object will not be null and this could cause loading errors if the embedded object contains primitives.

Ex: an embedded object to define phone numbers contains a formula to format the phone number, and an employee object which contains 3 phone numbers: the main phone, a pager phone, a fax phone

> add @AttributeOverride with formula support
> -------------------------------------------
>
>                 Key: ANN-489
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-489
>             Project: Hibernate Annotations
>          Issue Type: Improvement
>          Components: binder
>    Affects Versions: 3.2.0.ga
>            Reporter: Amir Pashazadeh
>
> @AttributeOverride currently just have name and column properties, there can be an alternative with formula support (instead of column support).

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