class JpaSupport {

    @Resource
    private EruptDao eruptDao;

    /**
     * 对jpa @JoinColumn提供的referencedColumnName配置实现适配
     */
    @SneakyThrows
    public void referencedColumnNameSupport(Object obj, Field field) {<FILL_FUNCTION_BODY>}

}

        EruptField eruptField = field.getAnnotation(EruptField.class);
        if (null != eruptField) {
            JoinColumn joinColumn = field.getAnnotation(JoinColumn.class);
            if (null != joinColumn && !"".equals(joinColumn.referencedColumnName())) {
                String id;
                if (eruptField.edit().type() == EditType.REFERENCE_TREE) {
                    id = eruptField.edit().referenceTreeType().id();
                } else if (eruptField.edit().type() == EditType.REFERENCE_TABLE) {
                    id = eruptField.edit().referenceTableType().id();
                } else {
                    return;
                }
                field.setAccessible(true);
                Object refObject = field.get(obj);
                if (null != refObject) {
                    Field idField = ReflectUtil.findClassField(refObject.getClass(), id);
                    idField.setAccessible(true);
                    EntityManager em = eruptDao.getEntityManager();
                    EruptDataSource eruptDataSource = refObject.getClass().getAnnotation(EruptDataSource.class);
                    if (eruptDataSource != null) {
                        em = eruptDao.getEntityManager(eruptDataSource.value());
                    }
                    Object result = em.createQuery("from " + refObject.getClass().getSimpleName() + " I where I.id = :id")
                            .setParameter("id", idField.get(refObject)).getSingleResult();
                    em.close();
                    field.set(obj, result);
                }
            }
        }

    
<no_super_class>