You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the purposes of security when dealing with payments and transactions, would like to ensure that any transaction that is going to be settled was creating using the right means, ie through the account aggregate. The way we check this is ensuring there exists a TransactionCreatedEvent event in stored_events where the event_properties contains the system_trace (system trace audit number` . Noticed a serious performance lag when searching for Transactions that have stored_events.
The recordedEvent relationship as used on eloquent below
Tried creating an indexed computed column to improve the performance but currently unable to do so. Creating a new migration to add the column to stored_events table.
Schema::table('stored_events', function (Blueprint$table) {
$table->string('transaction_system_trace')
->nullable()
->virtualAs('`event_properties`->>"$.system_trace"')
->after('event_properties')
->index();
});
Don't know what I'm doing wrong but this does not work. Testing with sqlite by the way so I don't know if it affects this somehow. Would like to replace 'event_properties->system_trace' with 'transaction_system_trace' in the recordedEvent() relationship.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
For the purposes of security when dealing with payments and transactions, would like to ensure that any transaction that is going to be settled was creating using the right means, ie through the account aggregate. The way we check this is ensuring there exists a
TransactionCreatedEvent
event instored_events
where theevent_properties
contains thesystem_trace
(system trace audit number` . Noticed a serious performance lag when searching for Transactions that have stored_events.The recordedEvent relationship as used on eloquent below
Tried creating an indexed computed column to improve the performance but currently unable to do so. Creating a new migration to add the column to
stored_events
table.Don't know what I'm doing wrong but this does not work. Testing with
sqlite
by the way so I don't know if it affects this somehow. Would like to replace'event_properties->system_trace'
with'transaction_system_trace'
in therecordedEvent()
relationship.Beta Was this translation helpful? Give feedback.
All reactions