The following issue has been updated: Updater: Jesper Pedersen (mailto:[EMAIL PROTECTED]) Date: Thu, 3 Feb 2005 6:15 AM Comment: All testcase for this issue Changes: Attachment changed to xdoclet-1057.zip --------------------------------------------------------------------- For a full history of the issue, see:
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1057?page=history --------------------------------------------------------------------- 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: xdoclet-devel (Use for new issues) Reporter: Marko Friedemann Created: Mon, 6 Sep 2004 5:26 AM Updated: Thu, 3 Feb 2005 6:15 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 ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ xdoclet-devel mailing list xdoclet-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xdoclet-devel