Project

General

Profile

Revision 67a5e8fa

ID67a5e8fad6ca9eb8c8811af02de7ec91569374f2
Parent 526f235a
Child b33ecfd3

Added by Andreas Müller about 2 months ago

ref #6581 adapt StatisticsDaoHibernateImpl to TaxonNode.source

View differences:

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/statistics/StatisticsDaoHibernateImpl.java
448 448

  
449 449
		// get node relations references:
450 450
		queryStrings
451
				.add("select distinct tn.referenceForParentChildRelation.uuid as c from TaxonNode tn "
452
						+ "where tn.classification=:classification "
453
						+ "and tn.referenceForParentChildRelation is not null ");
451
				.add(" SELECT DISTINCT ts.citation.uuid AS c "
452
				   + " FROM TaxonNode tn "
453
				   + " LEFT JOIN tn.source ts "
454
                   + " WHERE tn.classification = :classification "
455
				   + "     AND ts.citation IS NOT NULL ");
454 456

  
455 457
		// get sec references
456 458
		// -------------------------------------------------------------------
......
816 818

  
817 819
		// get node relations references:
818 820
		queryStrings
819
				.add("SELECT COUNT(DISTINCT tn.referenceForParentChildRelation.id) as c "
821
				.add("SELECT COUNT(DISTINCT ts.citation.id) as c "
820 822
				    + "FROM TaxonNode tn "
821
					+ "WHERE tn.classification=:classification "
822
					+ "  AND tn.referenceForParentChildRelation is not null ");
823
				    + "   LEFT JOIN tn.source ts "
824
                    + "WHERE tn.classification = :classification "
825
					+ "  AND tn.source.citation is not null ");
823 826

  
824 827
		// get sec references
825 828
		// -------------------------------------------------------------------
......
827 830
		queryStrings
828 831
				.add("SELECT COUNT(DISTINCT tn.taxon.sec.id) as c "
829 832
				        + "from TaxonNode tn "
830
						+ "where tn.classification=:classification "
833
						+ "where tn.classification = :classification "
831 834
						+ " and tn.taxon.sec is not null ");
832 835

  
833 836
		// synonyms

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)