Project

General

Profile

« Previous | Next » 

Revision a8905b5d

Added by Andreas Kohlbecker almost 4 years ago

reverting commit last for ref #9095, ref #9096, ref #7331 for a better solution

View differences:

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/initializer/TeamAutoInitializer.java
34 34
    public String hibernateFetchJoin(Class<?> clazz, String beanAlias) throws Exception{
35 35

  
36 36
        String result = "";
37
        if(clazz.equals(Team.class)){
38
            result += String.format(" LEFT JOIN FETCH %s.teamMembers ", beanAlias);
39
        }
37
        // can't distinguish Person and Team here as
38
        // ((HibernateProxy)propertyValue).getHibernateLazyInitializer().getPersistentClass();
39
        // always returns TeamOrPersonBase in
40
        // AdvancedBeanInitializer.preparePropertyValueForBulkLoadOrStore(BeanInitNode node, Object parentBean, String param, Object propertyValue)
41
        result += String.format(" LEFT JOIN FETCH %s.teamMembers ", beanAlias);
40 42

  
41 43
        return result;
42 44
    }

Also available in: Unified diff