One-to-one and one-to-many relationship
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 18.4k
- Forks
- 3.7k
- Avg merge
- 5h 8m
- Merged PRs (30d)
- 1
Description
Hi,
I have a table with 9 relationships, being six one-to-one relationships and three one-to-many relationships.
I encountered two difficulties
1st, the query method accepts only 7 entities
2º when it is one for a lot and use the distinct like this one in the documentation works but when I have a relationship that brings 5 children records and the other one after 3 children records the query returns 5 in the two
Doubts
How would I have to have more than 7 entities in the relationship?
How do I make the one-to-many relationship when the number of children are different?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported relationship mapping with a minimal table and query containing six one-to-one and three one-to-many relationships. Document how Dapper handles more than seven entities and child collections with different lengths; a useful resolution would need a confirmed mapping approach and clarified expected results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, sql
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100