@@ -113,13 +113,26 @@ public function createLoadContentInfoQueryBuilder(
113
113
}
114
114
115
115
$ queryBuilder
116
- ->select ('c.* ' , 't.main_node_id AS ezcontentobject_tree_main_node_id ' )
116
+ ->select (
117
+ 'c.* ' ,
118
+ 't.main_node_id AS ezcontentobject_tree_main_node_id ' ,
119
+ 'cc.identifier AS ezcontentclass_identifier '
120
+ )
117
121
->from (Gateway::CONTENT_ITEM_TABLE , 'c ' )
118
122
->leftJoin (
119
123
'c ' ,
120
124
'ezcontentobject_tree ' ,
121
125
't ' ,
122
126
$ joinCondition
127
+ )
128
+ ->leftJoin (
129
+ 'c ' ,
130
+ 'ezcontentclass ' ,
131
+ 'cc ' ,
132
+ $ expr ->and (
133
+ $ expr ->eq ('c.contentclass_id ' , 'cc.id ' ),
134
+ $ expr ->eq ('cc.version ' , 0 )
135
+ )
123
136
);
124
137
125
138
return $ queryBuilder ;
@@ -163,7 +176,9 @@ public function createVersionInfoFindQueryBuilder(): DoctrineQueryBuilder
163
176
'c.status AS ezcontentobject_status ' ,
164
177
'c.name AS ezcontentobject_name ' ,
165
178
'c.language_mask AS ezcontentobject_language_mask ' ,
166
- 'c.is_hidden AS ezcontentobject_is_hidden '
179
+ 'c.is_hidden AS ezcontentobject_is_hidden ' ,
180
+ // Content class
181
+ 'cc.identifier AS ezcontentclass_identifier '
167
182
)
168
183
->from (Gateway::CONTENT_VERSION_TABLE , 'v ' )
169
184
->innerJoin (
@@ -180,6 +195,15 @@ public function createVersionInfoFindQueryBuilder(): DoctrineQueryBuilder
180
195
$ expr ->eq ('t.contentobject_id ' , 'v.contentobject_id ' ),
181
196
$ expr ->eq ('t.main_node_id ' , 't.node_id ' )
182
197
)
198
+ )
199
+ ->leftJoin (
200
+ 'c ' ,
201
+ 'ezcontentclass ' ,
202
+ 'cc ' ,
203
+ $ expr ->and (
204
+ $ expr ->eq ('c.contentclass_id ' , 'cc.id ' ),
205
+ $ expr ->eq ('cc.version ' , 0 )
206
+ )
183
207
);
184
208
185
209
return $ query ;
0 commit comments