[hibernate-issues] [Hibernate-JIRA] Updated: (METAGEN-71) Metamodel check fails when subclasses are used

Hardy Ferentschik (JIRA) noreply at atlassian.com
Wed Jul 20 08:17:14 EDT 2011


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

Hardy Ferentschik updated METAGEN-71:
-------------------------------------

      Description: 
Situation:
Class 'AbstractIntake' which has the field 'm_startDate'
Class 'Intake' extends 'AbstractIntake'
In Class 'AbstractIntake_.java" there is the line:
	public static volatile SingularAttribute<WorkOrder, MESDateField> m_startDate;
'm_startDate' is of type MESDateField which is an Embeddable object.

Result:
I get the following error when the metamodel is checked:
Unable to locate static metamodel field : gti.domain.Intake_#m_startDate

Expected:
'Intake_' subclasses 'AbstractIntake_' and therefore has access to the
static variable 'm_startDate' (in AbstractIntake_). The errormessage is 
therefore not valid!

Hints:
MESDateField is an Embeddable object.
It seems to only to go wrong with Embeddable objects.
Maybe the problem is in "MetadataContext.registerAttribute()'.
There ONLY the getDeclaredField(name) of the class is checked but NOT the
subclasses of that class!



  was:

Situation:
Class 'AbstractIntake' which has the field 'm_startDate'
Class 'Intake' extends 'AbstractIntake'
In Class 'AbstractIntake_.java" there is the line:
	public static volatile SingularAttribute<WorkOrder, MESDateField> m_startDate;
'm_startDate' is of type MESDateField which is an Embeddable object.

Result:
I get the following error when the metamodel is checked:
Unable to locate static metamodel field : gti.domain.Intake_#m_startDate

Expected:
'Intake_' subclasses 'AbstractIntake_' and therefore has access to the
static variable 'm_startDate' (in AbstractIntake_). The errormessage is 
therefore not valid!

Hints:
MESDateField is an Embeddable object.
It seems to only to go wrong with Embeddable objects.
Maybe the problem is in "MetadataContext.registerAttribute()'.
There ONLY the getDeclaredField(name) of the class is checked but NOT the
subclasses of that class!



    Fix Version/s: 1.2.next

> Metamodel check fails when subclasses are used
> ----------------------------------------------
>
>                 Key: METAGEN-71
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/METAGEN-71
>             Project: Hibernate Metamodel Generator
>          Issue Type: Bug
>          Components: processor
>    Affects Versions: 1.1.1.Final
>            Reporter: kk
>            Assignee: Hardy Ferentschik
>             Fix For: 1.2.next
>
>
> Situation:
> Class 'AbstractIntake' which has the field 'm_startDate'
> Class 'Intake' extends 'AbstractIntake'
> In Class 'AbstractIntake_.java" there is the line:
> 	public static volatile SingularAttribute<WorkOrder, MESDateField> m_startDate;
> 'm_startDate' is of type MESDateField which is an Embeddable object.
> Result:
> I get the following error when the metamodel is checked:
> Unable to locate static metamodel field : gti.domain.Intake_#m_startDate
> Expected:
> 'Intake_' subclasses 'AbstractIntake_' and therefore has access to the
> static variable 'm_startDate' (in AbstractIntake_). The errormessage is 
> therefore not valid!
> Hints:
> MESDateField is an Embeddable object.
> It seems to only to go wrong with Embeddable objects.
> Maybe the problem is in "MetadataContext.registerAttribute()'.
> There ONLY the getDeclaredField(name) of the class is checked but NOT the
> subclasses of that class!

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list