Message: The following issue has been re-assigned.
Assignee: Matthias Germann (mailto:[EMAIL PROTECTED]) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1057 Here is an overview of the issue: --------------------------------------------------------------------- Key: XDT-1057 Summary: [value-object] relation w/ multiple VOs Type: Bug Status: Open Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: XDoclet Components: EJB Module Versions: 1.2 Assignee: Matthias Germann Reporter: Marko Friedemann Created: Mon, 6 Sep 2004 5:26 AM Updated: Sun, 3 Apr 2005 3:13 AM Description: I'll repeat here what I posted to the list earlier as Heiko Rupp pointed out it was best to raise this as an issue in JIRA. I"ve encountered a bug in the code for value object creation. I have a bean with quite a few data fields and got finally hit by the need to implement two different value objects for it. The bean has a relation to another instance of itself (parent) and thus each of the two value objects needs the appropriate aggregate. The bug manifests itself in both value objects having the same aggregate member (the first of both to be found as a value-object tag for the relation method) instead of the matching one. This is caused by the code in xdoclet.modules.ejb.entity.ValueObjectTagsHandler.forAllRelations (776 ll.) calling isValueObjectRelation() (which returns true if there is a matching tag) but then simply using the first value-object tag from the tag list, instead of checking wether this is actually the matching one. ,-- ValueObjectTagsHandler (CVS rev. 1.21) -- |799 if (MethodTagsHandler.isGetter(getCurrentMethod().getName()) && |800 !foundFields.containsKey(getCurrentMethod().getName()) && |801 isValueObjectRelation(getCurrentMethod(), valueObject)) { | | /* is true for both value objects, as the method has two tags */ | |802 |803 boolean ret = getCurrentMethod().getDoc() | .hasTag("ejb:value-object"); | /* snip */ |807 if (ret) { |808 Collection tags = getCurrentMethod().getDoc() | .getTags("ejb:value-object"); |809 |810 for (Iterator i = tags.iterator(); i.hasNext(); ) { |811 XTag tag = (XTag) i.next(); | | /* here should be another check wether tag actually matches | the valueobject to be created */ | |812 String aggreg = tag.getAttributeValue(type); | /* snip */ |819 if (aggreg != null) { | /* snip */ |858 break; |859 } |860 } `---------------------------------------- ,-- extract of the Bean class in question -- | * @ejb.value-object | * match="Full" | * aggregate="XYZ.ejb.intrface.ABCValue" | * aggregate-name="ParentValue" | * members="XYZ.ejb.intrface.ABCLocal" | * members-name="ParentValue" | * relation="external" | * | * @ejb.value-object | * match="Id" | * aggregate="XYZ.ejb.intrface.ABCIdValue" | * aggregate-name="ParentIdValue" | * members="XYZ.ejb.intrface.ABCLocal" | * members-name="ParentValue" | * relation="external" | */ | abstract public ABCLocal getParent(); `----------------------------------------------- --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ xdoclet-devel mailing list xdoclet-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xdoclet-devel