[ 
https://issues.apache.org/jira/browse/CAUSEWAY-3653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17792784#comment-17792784
 ] 

Patrick Deenen commented on CAUSEWAY-3653:
------------------------------------------

Code change suggestion:
{code:java}
private byte[] zip() {

    val pmFactory = getPersistenceManagerFactory();

    val zipBuilder = ZipUtils.zipEntryBuilder();

    pmFactory.getManagedClasses().stream()
    .filter(jdoFacetContext::isPersistenceEnhanced)
    .map(Class::getName)
    .forEach(className->
            zipBuilder.addAsUtf8(zipEntryNameFor(className), 
pmFactory.getMetadata(className).toString()));
    return zipBuilder.toBytes();
}

private String zipEntryNameFor(final String className) {
    return className + ".xml";
} {code}

> Menu Protoyping > Download JDO metamodel (ZIP) > Exception
> ----------------------------------------------------------
>
>                 Key: CAUSEWAY-3653
>                 URL: https://issues.apache.org/jira/browse/CAUSEWAY-3653
>             Project: Causeway
>          Issue Type: Bug
>          Components: Persistence JDO
>    Affects Versions: 2.0.0-RC3
>            Reporter: Daniel Keir Haywood
>            Assignee: Andi Huber
>            Priority: Minor
>             Fix For: 2.0.0-RC4
>
>
> If there is more than one entity with the same simple class name ... should 
> use the fully qualified class name instead for the zip entries.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to