[
http://opensource.atlassian.com/projects/hibernate/browse/METAGEN-7?page=...
]
Hardy Ferentschik commented on METAGEN-7:
-----------------------------------------
Yes, {{init()}} is called all the time, but how do in init whether the processing has to
end and I have to write the metamodel classes from {{init()}} instead of {{process}}.
There is no equivalent to {{roundEnvironment.processingOver()}}.
Anyways, I decided to rely in meta data information in xml. If you only have XML
configuration you need to specify
{code}
<persistence-unit-metadata>
<xml-mapping-metadata-complete/>
</persistence-unit-metadata>
{code}
in one of your mapping files. I think that's a reasonable assumption.
Try to find a way to be able to use
@SupportedAnnotationTypes("javax.persistence.Entity") in
JPAMetaModelEntityProcessor
------------------------------------------------------------------------------------------------------------------------
Key: METAGEN-7
URL:
http://opensource.atlassian.com/projects/hibernate/browse/METAGEN-7
Project: Hibernate Metamodel Generator
Issue Type: Task
Components: processor
Affects Versions: 1.0.0-Beta-2
Reporter: Hardy Ferentschik
Assignee: Hardy Ferentschik
Fix For: 1.1.0
At the moment we use @SupportedAnnotationTypes("*"). Better would be to
explicitly specify @SupportedAnnotationTypes("javax.persistence.Entity"). Then
the processor would only be called if there are any entities annotated with @Entity.
However, this also means that the processor is not getting called at all if there is no
@Entity which could be the case if all configuration is done via xml.
We would need a way to make sure that the processor is called at least once to ensure xml
is parsed. Other than that only entities annotated with @Entity should be passed to the
processor.
At the moment I don't see how we can make this happen :(
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira