Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php |
— | — | @@ -130,7 +130,9 @@ |
131 | 131 | // *** Prepare the cache ***// |
132 | 132 | if ( !array_key_exists( $sid, $this->m_semdata ) ) { // new cache entry |
133 | 133 | $this->m_semdata[$sid] = new SMWSqlStubSemanticData( $subject, false ); |
134 | | - $this->m_semdata[$sid]->addPropertyStubValue( '_SKEY', array( $sortkey ) ); |
| 134 | + if ( $subject->getSubobjectId() == '' ) { // no sortkey for subobjects |
| 135 | + $this->m_semdata[$sid]->addPropertyStubValue( '_SKEY', array( $sortkey ) ); |
| 136 | + } |
135 | 137 | $this->m_sdstate[$sid] = array(); |
136 | 138 | // Note: the sortkey is always set but belongs to no property table, |
137 | 139 | // hence no entry in $this->m_sdstate[$sid] is made. |