Inherited TableAttribute is ignored by CRUD operations
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 48/100
Research direction
Start in src/Dapper.Contrib/SqlMapperExtensions.cs at GetTableName and compare its CustomAttributes handling with the ExplicitKeyAttribute handling around the referenced lines. Verify how inherited TableAttribute values flow through CRUD operations and determine whether those operations should use the inherited table name rather than requiring TableMapper or repeated attributes.
Written by the indexing model from the issue text.
Description
The TableAttribute is inherited to subclasses but then ignored by the CRUD operations. This is due to the method SQLMapperExtensions.GetTableName ignoring inherited CustomAttributes.
This feels wrong since the attribute is actually being inherited and attributes on property level are not being ignored, e.g.: properties with ExplicitKeyAttribute
Currently you have to either specify the table name for every subclass or make use of SQLMapperExtensions.TableMapper.
Is this behaviour wanted?
- Dominant language
- C#
- Stars
- 293
- Forks
- 109
- PR merge metrics
- No merged PRs in 30d
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.
More from DapperLib/Dapper.Contrib
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
DapperLib/Dapper.Contrib#22 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 42/100
DapperLib/Dapper.Contrib#174 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
DapperLib/Dapper.Contrib#173 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 10/100
DapperLib/Dapper.Contrib#172 · 1 comment · 4 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
DapperLib/Dapper.Contrib#169 ·
All issues in DapperLib/Dapper.Contrib
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·