[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-4720) Improve javax.persistence.metamodel.Attribute support

Steve Ebersole (JIRA) noreply at atlassian.com
Mon Dec 21 15:37:29 EST 2009


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Ebersole updated HHH-4720:
--------------------------------

    Description: 
1) o.h.ejb.metamodel.AttributeFactory is currently using Type.getReturnedClass() from the o.h.type.Type associated with the attibute as it's javaType.  That is not accurate in all cases, especially in subclassing scenarios like java.util.Date and the java.sql variants.  We should instead look at the Member for the attribute to determine the java type (perhaps applying some validation of the "assignability").

2) Emmanuel has said there are a few cases where there is a discrepancy between how Hibernate captures information versus how the JPA metamodel package expects to report it.  E.g. @ManyToOne @JoinTable where the AnnotationBinder hands this to core as a many-to-many but JPA metadata still expects @ManyToOne to be reported.

  was:o.h.ejb.metamodel.AttributeFactory is currently using Type.getReturnedClass() from the o.h.type.Type associated with the attibute as it's javaType.  That is not accurate in all cases, especially in subclassing scenarios like java.util.Date and the java.sql variants.  We should instead look at the Member for the attribute to determine the java type (perhaps applying some validation of the "assignability").

        Summary: Improve javax.persistence.metamodel.Attribute support  (was: AttributeFactory uses Type.getReturnedClass() for the attribute's javatype)

> Improve javax.persistence.metamodel.Attribute support
> -----------------------------------------------------
>
>                 Key: HHH-4720
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4720
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: entity-manager, metamodel
>    Affects Versions: 3.5.0-Beta-2
>            Reporter: Steve Ebersole
>            Assignee: Steve Ebersole
>             Fix For: 3.5
>
>
> 1) o.h.ejb.metamodel.AttributeFactory is currently using Type.getReturnedClass() from the o.h.type.Type associated with the attibute as it's javaType.  That is not accurate in all cases, especially in subclassing scenarios like java.util.Date and the java.sql variants.  We should instead look at the Member for the attribute to determine the java type (perhaps applying some validation of the "assignability").
> 2) Emmanuel has said there are a few cases where there is a discrepancy between how Hibernate captures information versus how the JPA metamodel package expects to report it.  E.g. @ManyToOne @JoinTable where the AnnotationBinder hands this to core as a many-to-many but JPA metadata still expects @ManyToOne to be reported.

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