@@ -179,6 +179,17 @@ export class PostgresSubscriber implements EntitySubscriberInterface {
179
179
if ( fullEntity ) {
180
180
console . log ( "✅ Full entity loaded:" , { id : fullEntity . id , tableName : event . metadata . tableName } ) ;
181
181
182
+ // Debug: Log the exact entity we're working with
183
+ console . log ( "🔍 Full entity details:" , {
184
+ id : fullEntity . id ,
185
+ name : fullEntity . name ,
186
+ charter : fullEntity . charter ,
187
+ ename : fullEntity . ename ,
188
+ entityName : entityName ,
189
+ isGroup : entityName === "Group"
190
+ } ) ;
191
+
192
+ // Check eVault creation BEFORE enriching the entity
182
193
if ( entityName === "Group" && fullEntity . charter && fullEntity . charter . trim ( ) !== "" ) {
183
194
console . log ( "✅ Group entity with charter detected" ) ;
184
195
@@ -202,11 +213,27 @@ export class PostgresSubscriber implements EntitySubscriberInterface {
202
213
} ) ;
203
214
}
204
215
216
+ // Debug: Log the entity BEFORE enrichment
217
+ console . log ( "🔍 Entity BEFORE enrichment:" , {
218
+ id : fullEntity . id ,
219
+ charter : fullEntity . charter ,
220
+ ename : fullEntity . ename ,
221
+ tableName : event . metadata . tableName
222
+ } ) ;
223
+
205
224
entity = ( await this . enrichEntity (
206
225
fullEntity ,
207
226
event . metadata . tableName ,
208
227
event . metadata . target
209
228
) ) as ObjectLiteral ;
229
+
230
+ // Debug: Log the entity AFTER enrichment
231
+ console . log ( "🔍 Entity AFTER enrichment:" , {
232
+ id : entity . id ,
233
+ charter : entity . charter ,
234
+ ename : entity . ename ,
235
+ tableName : event . metadata . tableName
236
+ } ) ;
210
237
} else {
211
238
console . log ( "❌ Could not load full entity for ID:" , entityId ) ;
212
239
}
0 commit comments