luckyframework / luckyframework/website
polymorphic association docs don't explain database structure
- Dominant language
- Crystal
- Stars
- 39
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
https://luckyframework.org/guides/database/models#polymorphic-associations
Coming from rails, I was reading the guide assuming the table had a `assoc_type` and `assoc_id` columns but the way Lucky accomplishes the polymorphic relationship is by having a nilable column for each different type and handles the polymorphism at the code layer.
A better explanation of the database layout would make it more clear.
Maybe even bonus points if we lay out how why Lucky can't do polymorphic associations like Rails does since we are statically typed.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the polymorphic associations section at the linked database models guide and inspect how the current explanation describes the relationship. Update the documentation to show the nilable column for each type and explain why Lucky's statically typed design differs from Rails; done when the database layout and limitation are clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- crystal
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100