[hibernate-issues] [Hibernate-JIRA] Commented: (HBX-825) hbm2java: Circular dependency between POJO source generation and Comparator class compilation
Julien Fourment (JIRA)
noreply at atlassian.com
Fri Nov 17 11:05:05 EST 2006
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-825?page=comments#action_25358 ]
Julien Fourment commented on HBX-825:
-------------------------------------
I've downloaded latest version of the tool (3.2beta8) and still get the same error with the work-around.
Whatever happens, Collection.getComparator() is still called and throws an exception.
Anyway, I found another workaround: my POJO objects implements an interface using meta attribute, and the comparator works with this interface ... So now I can compile my comparators before the code generation.
> hbm2java: Circular dependency between POJO source generation and Comparator class compilation
> ---------------------------------------------------------------------------------------------
>
> Key: HBX-825
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-825
> Project: Hibernate Tools
> Type: Bug
> Components: hbm2java
> Versions: 3.1beta3
> Environment: Hibernate 3.1.3 and +.
> Using MySQL 5.0
> Reporter: Julien Fourment
> Attachments: example_and_traces.zip
>
>
> Hi,
> My java objects are generated from the xml files using hbm2java. One of my collection is sorted using a Comparator class.
> hbm2java fails saying the comparator cannot be instantiated. But as the comparator makes reference to my java object, it cannot be compiled before the generation happened. We have a circular dependency here. (see example enclosed).
> Is there any way to fix this ?
> Many thanks !
--
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