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

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


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=35018#action_35018 ] 

Steve Ebersole commented on HHH-4720:
-------------------------------------

There was a question in regards to javax.persistence.metamodel.Attribute and declared primitive types.  The spec is unfortunately silent on this subject.  It makes the most sense imo to report the primitive type here so that is what our implementation does.

This comes into play if you call any of the following methods:
getBindableJavaType()
getJavaType()
getType().getJavaType()

> 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
>
>          Time Spent: 2 days, 6 hours, 56 minutes
>  Remaining Estimate: 0 minutes
>
> 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