Skip to content
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

Refine twenty-orm 'object metadata not found' issue #6416

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

charlesBochet
Copy link
Member

@charlesBochet charlesBochet commented Jul 25, 2024

Twenty ORM sometimes does not find corresponding object metadata in memory. This PR adds a bit more log to understand where the issue could come from

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Enhanced error handling and refactoring in workspace.repository.ts to improve object metadata retrieval and maintainability.

  • Updated isPlainObject import to @nestjs/common/utils/shared.utils.
  • Enhanced error messages in getObjectMetadataFromTarget for missing metadata.
  • Refactored getCompositeFieldMetadata to getCompositeFieldMetadataCollection with objectMetadata parameter.
  • Improved code readability and separation of concerns.

Thorough testing is recommended to validate the new error handling logic.

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

@charlesBochet charlesBochet changed the title Fix object metadata not found Refine twenty-orm 'object metadata not found' issue Jul 25, 2024
@charlesBochet charlesBochet merged commit 8083175 into main Jul 25, 2024
6 checks passed
@charlesBochet charlesBochet deleted the add-more-logs-to-messaging branch July 25, 2024 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant