-
Notifications
You must be signed in to change notification settings - Fork 103
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
Feat/support for many to many relationship #1038
Feat/support for many to many relationship #1038
Conversation
…y relationship if it exist.
…ts relationship with the tables in a many-to-many association.
…r generation of implicit join table.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
@prakha is attempting to deploy a commit to the ROUTE06 Core Team on Vercel. A member of the Team first needs to authorize it. |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
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.
Thanks 🙏🏻
const cardinalitySchema = v.picklist([ | ||
'ONE_TO_ONE', | ||
'ONE_TO_MANY', | ||
'MANY_TO_MANY', |
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.
@prakha Can't you implement MANY_TO_MANY
in cardinality without adding it?
I know that during the parsing logic, I am tentatively adding and then deleting the key at the end.
However, if it is defined here, others may misinterpret it as requiring the implementation of MANY_TO_MANY.
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.
ok let me see what i can do.
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.
@MH4GF ,Could you please suggest how to proceed?
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.
@prakha
Sorry for the wait! I wrote a sample implementation. This is a PoC that cannot be imported as is, but please use it as a reference.
https://github.com/liam-hq/liam/pull/1179/files
} | ||
} | ||
} | ||
} |
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.
And, Could you add test cases?
…dinality - Update schema to only allow ONE_TO_ONE and ONE_TO_MANY - Move many-to-many relations to manyToManyRelationships object - Add better validation for relation fields - Preserve existing relationship constraints
Issue
Why is this change needed?
before there was. no support for many to many table. So i have added the logic that will generate the implicit table when many-to-many exist between the table.
What would you like reviewers to focus on?
Testing Verification
What was done
🤖 Generated by PR Agent at 8023912
MANY_TO_MANY
.Detailed Changes
parser.ts
Enhance schema parser to support many-to-many relationships
frontend/packages/db-structure/src/parser/prisma/parser.ts
associations.
MANY_TO_MANY
.processing.
dbStructure.ts
Update cardinality schema to include MANY_TO_MANY
frontend/packages/db-structure/src/schema/dbStructure.ts
MANY_TO_MANY
to the cardinality schema.Additional Notes