fix: multiple twenty orm issues & show an example of use (#5439)

This PR is fixing some issues and adding enhancement in TwentyORM:

- [x] Composite fields in nested relations are not formatted properly
- [x] Passing operators like `Any` in `where` condition is breaking the
query
- [x] Ability to auto load workspace-entities based on a regex path

I've also introduced an example of use for `CalendarEventService`:


https://github.com/twentyhq/twenty/pull/5439/files#diff-3a7dffc0dea57345d10e70c648e911f98fe237248bcea124dafa9c8deb1db748R15
This commit is contained in:
Jérémy M
2024-05-20 11:01:47 +02:00
committed by GitHub
parent 81e8f49033
commit 8b5f79ddbf
147 changed files with 1108 additions and 1101 deletions

View File

@ -4,7 +4,7 @@ import { OnEvent } from '@nestjs/event-emitter';
import { MessageQueue } from 'src/engine/integrations/message-queue/message-queue.constants';
import { MessageQueueService } from 'src/engine/integrations/message-queue/services/message-queue.service';
import { ObjectRecordCreateEvent } from 'src/engine/integrations/event-emitter/types/object-record-create.event';
import { WorkspaceMemberObjectMetadata } from 'src/modules/workspace-member/standard-objects/workspace-member.object-metadata';
import { WorkspaceMemberWorkspaceEntity } from 'src/modules/workspace-member/standard-objects/workspace-member.workspace-entity';
import {
UpdateSubscriptionJob,
UpdateSubscriptionJobData,
@ -22,7 +22,7 @@ export class BillingWorkspaceMemberListener {
@OnEvent('workspaceMember.created')
@OnEvent('workspaceMember.deleted')
async handleCreateOrDeleteEvent(
payload: ObjectRecordCreateEvent<WorkspaceMemberObjectMetadata>,
payload: ObjectRecordCreateEvent<WorkspaceMemberWorkspaceEntity>,
) {
if (!this.environmentService.get('IS_BILLING_ENABLED')) {
return;