newdevs:db:fm
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
newdevs:db:fm [2025/07/29 11:15] – [reltype] smayo | newdevs:db:fm [2025/07/29 11:26] (current) – [reltype] smayo | ||
---|---|---|---|
Line 91: | Line 91: | ||
=== reltype === | === reltype === | ||
- | These distinctions are to indicate key directionality. They are not to indicate nullability. | ||
- | * has_a -- the field physically exists as a column (as in, does not have the @oils_persist: | + | There are 3 reltypes: |
- | * has_many -- the field is does NOT physically exist on the described SQL relation, but instead exists as a class property that will be filled with a LIST of zero or more objects built from rows on another SQL relation, described by the < | + | * has_a -- the field physically exists as a column (as in, does not have the @oils_persist: |
- | * might_have -- the field does NOT physically exist on the described SQL relation, and there is exactly one row on another SQL relation described by the < | + | |
+ | | ||
+ | |||
+ | | ||
In other words, " | In other words, " | ||
+ | |||
Here's how to decide which reltype attribute to use: | Here's how to decide which reltype attribute to use: | ||
- | * If the field is not virtual, but backed by a real column: ALWAYS use " | + | |
- | * If the field is virtual, but there' | + | * If the field is not virtual, but backed by a real column: ALWAYS use " |
- | * If the field is virtual, and there can be any number of rows on the other end of the join: ALWAYS use " | + | |
+ | | ||
+ | |||
+ | | ||
=== key === | === key === |
newdevs/db/fm.1753802155.txt.gz · Last modified: 2025/07/29 11:15 by smayo