-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Refactor new relation sync #11711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Refactor new relation sync #11711
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Refactored workspace relation synchronization logic with improved join column handling and dynamic relation support.
- Added optional
joinColumn
property inWorkspaceRelationMetadataArgs
interface for explicit join column specification - Removed relation-type filtering in
getOriginalObjectMetadataCollection
, now fetches all fields which may impact performance - Renamed
updateFieldRelationMetadata
tocomputeFieldRelationMetadataFromDecorators
for better clarity - Added support for dynamic relations through
workspaceDynamicRelationMetadataArgsCollection
- Improved join column handling with direct
joinColumn
property check inStandardFieldRelationFactory
3 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
await objectMetadataRepository.find({ | ||
where: { | ||
workspaceId: context.workspaceId, | ||
fields: { | ||
type: FieldMetadataType.RELATION, | ||
}, | ||
}, | ||
relations: ['dataSource', 'fields'], | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Removing the relation type filter here will fetch all fields from the database instead of just relation fields. Consider keeping the filter to optimize database queries.
No description provided.