// Path: joiner-core/src/main/java/cz/encircled/joiner/exception/JoinerException.java
// public class JoinerException extends RuntimeException {
// 
//     public JoinerException(String message) {
//         super(message);
//     }
// 
//     public JoinerException(String message, Exception exception) {
//         super(message, exception);
//     }
// }


import cz.encircled.joiner.exception.JoinerException;
import org.eclipse.persistence.config.DescriptorCustomizer;
import org.eclipse.persistence.descriptors.ClassDescriptor;
import org.eclipse.persistence.descriptors.InheritancePolicy;
import org.eclipse.persistence.internal.descriptors.ObjectBuilder;
import org.eclipse.persistence.mappings.DatabaseMapping;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
            }
            this.cloningMappings = new ArrayList<>(original.getCloningMappings());
            this.eagerMappings = new ArrayList<>(original.getEagerMappings());
            this.relationshipMappings = new ArrayList<>(original.getRelationshipMappings());
        }

        @Override
        public DatabaseMapping getMappingForAttributeName(String name) {
            DatabaseMapping mapping = super.getMappingForAttributeName(name);
            // name contains spaces for "treat as ..." entries, just skip it
            if (mapping == null && !name.contains(SPACE)) {
                InheritancePolicy policy = this.descriptor.getInheritancePolicyOrNull();
                if (policy != null) {
                    mapping = findMappingOnChildren(policy, name);
                }
            }

            return mapping;
        }

        private DatabaseMapping findMappingOnChildren(InheritancePolicy policy, String name) {
            ArrayList<DatabaseMapping> found = new ArrayList<>();

            for (ClassDescriptor child : policy.getChildDescriptors()) {
                DatabaseMapping childMapping = child.getObjectBuilder().getMappingForAttributeName(name);
                if (childMapping != null) {
                    found.add(childMapping);
                }
            }

// Path: joiner-core/src/main/java/cz/encircled/joiner/exception/JoinerException.java
// public class JoinerException extends RuntimeException {
// 
//     public JoinerException(String message) {
//         super(message);
//     }
// 
//     public JoinerException(String message, Exception exception) {
//         super(message, exception);
//     }
// }


// Path: joiner-eclipse/src/main/java/cz/encircled/joiner/eclipse/InheritanceJoiningCustomizer.java
import cz.encircled.joiner.exception.JoinerException;
import org.eclipse.persistence.config.DescriptorCustomizer;
import org.eclipse.persistence.descriptors.ClassDescriptor;
import org.eclipse.persistence.descriptors.InheritancePolicy;
import org.eclipse.persistence.internal.descriptors.ObjectBuilder;
import org.eclipse.persistence.mappings.DatabaseMapping;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;

            }
            this.cloningMappings = new ArrayList<>(original.getCloningMappings());
            this.eagerMappings = new ArrayList<>(original.getEagerMappings());
            this.relationshipMappings = new ArrayList<>(original.getRelationshipMappings());
        }

        @Override
        public DatabaseMapping getMappingForAttributeName(String name) {
            DatabaseMapping mapping = super.getMappingForAttributeName(name);
            // name contains spaces for "treat as ..." entries, just skip it
            if (mapping == null && !name.contains(SPACE)) {
                InheritancePolicy policy = this.descriptor.getInheritancePolicyOrNull();
                if (policy != null) {
                    mapping = findMappingOnChildren(policy, name);
                }
            }

            return mapping;
        }

        private DatabaseMapping findMappingOnChildren(InheritancePolicy policy, String name) {
            ArrayList<DatabaseMapping> found = new ArrayList<>();

            for (ClassDescriptor child : policy.getChildDescriptors()) {
                DatabaseMapping childMapping = child.getObjectBuilder().getMappingForAttributeName(name);
                if (childMapping != null) {
                    found.add(childMapping);
                }
            }

            switch (found.size()) {