cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 22064] New: - XMLDBTransformer generation Key id
Date Fri, 01 Aug 2003 18:34:53 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22064>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22064

XMLDBTransformer generation Key id

           Summary: XMLDBTransformer generation Key id
           Product: Cocoon 2
           Version: Current CVS 2.1
          Platform: Other
        OS/Version: Windows XP
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: general components
        AssignedTo: dev@cocoon.apache.org
        ReportedBy: nicoo_@hotmail.com


In the case where we let the generation of keyID to the database (the attribut 
oid=""),there a bug : the resuls oid is empty (

Example :

<xindice:query type="create" oid="">
<coco>Hi erverybody</coco>
</xindice:query>

the result is  :
<xindice:query oid="" type="create" result="success" />
and not
<xindice:query oid="12131GSDSH323GD2" type="create" result="success" />


so i propose this little patch.. just add key=resource.getId(); after the 
creation

		if("create".equals(operation)) {
                    try {
                        Resource resource = collection.createResource(key, 
"XMLResource");
                        resource.setContent(document);
                        collection.storeResource(resource);
                        result = "success";
              --->     key=resource.getId();
                    } catch (XMLDBException e) {
                        message = "Failed to create resource " + key + ": " 
+ e.errorCode;
                        getLogger().debug(message, e);
                    }

Mime
View raw message