[ http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1513?page=comments#action_17211 ]
David Hittner commented on XDT-1513: ------------------------------------ Thanks for the fix, Paul ! That takes care of most cases, but not all. Consider: The classes in question are: /** @hibernate.class */ Class WaypointHistory { List waypoints; /** @hibernate.list table="waypoints" * @hibernate.collection-key column="id" * @hibernate.collection-index column="indx" * @hibernate.collection-composite-element class="Waypoint" */ public List getWaypoints() { return waypoints; } /* there are more properties, I just didn't note them */ } Class Waypoint { Location loc; Date time; /** @hibernate.component */ <--- potential change to @hibernate.nested-composite-element public Location getLocation() { return location; } /** @hibernate.property */ public Date getTime() { return time; } } Class Location { Double latitude; Double longitude; /** @hibernate.property */ public Double getLatitude() { return latitude; } /** @hibernate.property */ public Double getLongitude() { return longitude; } } The problem is that I cannot change the @hibernate.component to @hibernate.nested-composite-element on the Location property in the Waypoint class, because I need to have a Waypoint as a property (component) of yet another class: /** @hibernate.class */ Class Truck { Waypoint lastLocation; /** @hibernate component */ public Waypoint getLastLocation() { return lastLocation; } } The parser really needs to be able to understand that if we are persisting a component that has components, that the multilevel @hibernate.component tag needs to be dynamically replaced with a @hibernate.nested-composite-element tag. Should I resubmit this as a new bug number, or do you want to reopen this one? Thanks! David > List of Components containing components does not generate > nested-composite-element tag > --------------------------------------------------------------------------------------- > > Key: XDT-1513 > URL: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1513 > Project: XDoclet > Type: Bug > Components: Hibernate Module > Versions: 1.2.3 > Environment: Windows XP SP2 > Eclipse 3.1.0 > XDoclet 1.2.3 > Reporter: David Hittner > Assignee: xdoclet-devel (Use for new issues) > Fix For: 1.3 > > > I have created a class which needs to store a List of Components containing a > component. > The generated classfile.hbm.xml generates the List part correctly, and the > first-level component > correctly (as a composite-element), but the second-level component is > incorrectly tagged with <component> rather than > <nested-composite-element>, so Hibernate v3.0 fails to map the class at > runtime.. > Hibernatedoclet in Xdoclet 1.2.3 generated the following code: > <list> > <composite-element class="test.component" > <component class="test.nested_component"> > ... > </component> > </composite-element> > </list> > As far as I understand, it needs to generate (which works): > <list> > <composite-element class="test.component" > <nested-composite-element class="test.nested_component"> > ... > </nested-composite-element> > </composite-element> > </list> -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ xdoclet-devel mailing list xdoclet-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xdoclet-devel