package io.quarkus.hibernate.orm.deployment;

import java.util.Map;
import java.util.Set;

import io.quarkus.builder.item.SimpleBuildItem;

/**
 * Internal model to hold the mapping linking a JPA entity to its corresponding persistence units.
 */
public final class JpaModelPersistenceUnitMappingBuildItem extends SimpleBuildItem {

    private final Map<String, Set<String>> entityToPersistenceUnits;

    public JpaModelPersistenceUnitMappingBuildItem(Map<String, Set<String>> entityToPersistenceUnits) {
        this.entityToPersistenceUnits = entityToPersistenceUnits;
    }

    public Map<String, Set<String>> getEntityToPersistenceUnits() {
        return entityToPersistenceUnits;
    }
}

@@ -35,24 +35,54 @@
 eployment;%0A%0A
+import java.util.Collections;%0A
 import java.
@@ -570,16 +570,44 @@
 Units = 
+Collections.unmodifiableMap(
 entityTo
@@ -614,32 +614,33 @@
 PersistenceUnits
+)
 ;%0A    %7D%0A%0A    pub

Make JpaModelPersistenceUnitMappingBuildItem map unmodifiable