Skip to content

fix: relation on self not working#2875

Merged
charlesBochet merged 1 commit intomainfrom
fix/relation-on-self
Dec 8, 2023
Merged

fix: relation on self not working#2875
charlesBochet merged 1 commit intomainfrom
fix/relation-on-self

Conversation

@magrinj
Copy link
Copy Markdown
Contributor

@magrinj magrinj commented Dec 8, 2023

Relation on self was not working, this PR fix the ticket #2599.
You can now create relation like this one Person <-> Person.

@magrinj magrinj requested a review from Weiko December 8, 2023 10:34
@magrinj magrinj marked this pull request as ready for review December 8, 2023 10:34
@magrinj magrinj linked an issue Dec 8, 2023 that may be closed by this pull request
Copy link
Copy Markdown
Member

@charlesBochet charlesBochet left a comment

Choose a reason for hiding this comment

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

I have left comments!

}, {});

const createdRelationMetadata = await super.createOne({
...record,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm surprise about the usage of "record" here!?
it should be relation or relationMetadata

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Doesn't really have preference on that as it's referencing the user input, in fact it should be something like relationInput but name record is used in other places in the code for inputs.
I can take a quick look and rename them ? Or maybe we can create a small ticket for that ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

let's create a small ticket for that! But yes record should be only used to describe the data itself.
The full naming on the project is: an object record is an instance of an object metadata (class)

Copy link
Copy Markdown
Member

@charlesBochet charlesBochet left a comment

Choose a reason for hiding this comment

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

LGTM!

@charlesBochet charlesBochet merged commit 63196f8 into main Dec 8, 2023
@charlesBochet charlesBochet deleted the fix/relation-on-self branch December 8, 2023 11:06
@charlesBochet charlesBochet mentioned this pull request Dec 8, 2023
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.

fix: multiple relations on an object on the same entity

2 participants