-
-
Notifications
You must be signed in to change notification settings - Fork 495
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
v6 docs updates #4195
v6 docs updates #4195
Conversation
i just finished rebasing v6, sry about that |
Sorry about the mess of commits; I'm not really sure what I can do on my end to clean up that history aside from making a new branch. If you'd prefer that, let me know, but I imagine you're squash merging anyways. |
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## v6 #4195 +/- ##
=======================================
Coverage 99.48% 99.48%
=======================================
Files 219 219
Lines 14361 14361
Branches 3277 3277
=======================================
Hits 14287 14287
Misses 73 73
Partials 1 1 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Reset the changes, stash it and create new branch from v6. |
Or in the end, I will be squash merging, so as long as I can do that, it should be fine. |
docs/docs/type-safe-relations.md
Outdated
const author = await book2.author.load(); | ||
author.name; // sync safe access |
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.
this is not really sync-safe access - that is the $
property from Loaded
type. those two examples are doing exactly the same, both using the return value of the ref.load()
method
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.
Yea I struggled with the verbiage there; what I was trying to highly was that you can save a copy of the newly loaded entity... if you'd prefer to have only one of the two, I'd advocate for the second as I think it's clearer. Thoughts?
I just deleted the local branch, created a new one from your |
@B4nan FYI I added a new section; I just tried to create a migrations after upgrading as a sanity check and it tried to generate a migration switching everything from |
5165c10
to
c8676e7
Compare
@B4nan just added the mention about discouraging the use of |
6832e20
to
e98a184
Compare
docs/docs/decorators.md
Outdated
|--------------|------|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| `entity` | `string` | `() => EntityName` | yes | Set target entity type. | | ||
| `cascade` | `Cascade[]` | yes | Set what actions on owning entity should be cascaded to the relationship. Defaults to `[Cascade.PERSIST, Cascade.MERGE]` (see [Cascading](cascading.md)).| | ||
| `eager` | `boolean` | yes | Always load the relationship. (Discouraged for use with large collections) | |
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.
maybe better this way? i would really discourage it for any to-many relations, simply because any collection can get large over time, turning this into a timebomb basically.
| `eager` | `boolean` | yes | Always load the relationship. (Discouraged for use with large collections) | | |
| `eager` | `boolean` | yes | Always load the relationship. (Discouraged for use with to-many relations.) | |
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.
one last nit, and we can merge 👍
Adding a warning icon to make the header more obvious Removing stale references to BaseEntity Adding a section dedicated to .load Adding a comment about the changing default for timestamps Adding note to discourage eager with large collections Co-authored-by: Martin Adámek <banan23@gmail.com>
|--------------|------|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| `entity` | `string` | `() => EntityName` | yes | Set target entity type. | | ||
| `cascade` | `Cascade[]` | yes | Set what actions on owning entity should be cascaded to the relationship. Defaults to `[Cascade.PERSIST, Cascade.MERGE]` (see [Cascading](cascading.md)).| | ||
| `eager` | `boolean` | yes | Always load the relationship. (Discouraged for use with to-many relations.) | |
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.
@B4nan do the periods there bug you? If so, I can fix
- Adding a warning icon to the upgrade notes about typescript - Separating `.load` into a dedicated section for clarity - Removing stale references to `BaseEntity` <img width="1139" alt="image" src="https://user-images.githubusercontent.com/6445731/230470881-5a2b8e24-685b-4029-9737-1ca36792c079.png"> --------- Co-authored-by: Martin Adámek <banan23@gmail.com>
- Adding a warning icon to the upgrade notes about typescript - Separating `.load` into a dedicated section for clarity - Removing stale references to `BaseEntity` <img width="1139" alt="image" src="https://user-images.githubusercontent.com/6445731/230470881-5a2b8e24-685b-4029-9737-1ca36792c079.png"> --------- Co-authored-by: Martin Adámek <banan23@gmail.com>
- Adding a warning icon to the upgrade notes about typescript - Separating `.load` into a dedicated section for clarity - Removing stale references to `BaseEntity` <img width="1139" alt="image" src="https://user-images.githubusercontent.com/6445731/230470881-5a2b8e24-685b-4029-9737-1ca36792c079.png"> --------- Co-authored-by: Martin Adámek <banan23@gmail.com>
- Adding a warning icon to the upgrade notes about typescript - Separating `.load` into a dedicated section for clarity - Removing stale references to `BaseEntity` <img width="1139" alt="image" src="https://user-images.githubusercontent.com/6445731/230470881-5a2b8e24-685b-4029-9737-1ca36792c079.png"> --------- Co-authored-by: Martin Adámek <banan23@gmail.com>
- Adding a warning icon to the upgrade notes about typescript - Separating `.load` into a dedicated section for clarity - Removing stale references to `BaseEntity` <img width="1139" alt="image" src="https://user-images.githubusercontent.com/6445731/230470881-5a2b8e24-685b-4029-9737-1ca36792c079.png"> --------- Co-authored-by: Martin Adámek <banan23@gmail.com>
- Adding a warning icon to the upgrade notes about typescript - Separating `.load` into a dedicated section for clarity - Removing stale references to `BaseEntity` <img width="1139" alt="image" src="https://user-images.githubusercontent.com/6445731/230470881-5a2b8e24-685b-4029-9737-1ca36792c079.png"> --------- Co-authored-by: Martin Adámek <banan23@gmail.com>
- Adding a warning icon to the upgrade notes about typescript - Separating `.load` into a dedicated section for clarity - Removing stale references to `BaseEntity` <img width="1139" alt="image" src="https://user-images.githubusercontent.com/6445731/230470881-5a2b8e24-685b-4029-9737-1ca36792c079.png"> --------- Co-authored-by: Martin Adámek <banan23@gmail.com>
- Adding a warning icon to the upgrade notes about typescript - Separating `.load` into a dedicated section for clarity - Removing stale references to `BaseEntity` <img width="1139" alt="image" src="https://user-images.githubusercontent.com/6445731/230470881-5a2b8e24-685b-4029-9737-1ca36792c079.png"> --------- Co-authored-by: Martin Adámek <banan23@gmail.com>
- Adding a warning icon to the upgrade notes about typescript - Separating `.load` into a dedicated section for clarity - Removing stale references to `BaseEntity` <img width="1139" alt="image" src="https://user-images.githubusercontent.com/6445731/230470881-5a2b8e24-685b-4029-9737-1ca36792c079.png"> --------- Co-authored-by: Martin Adámek <banan23@gmail.com>
- Adding a warning icon to the upgrade notes about typescript - Separating `.load` into a dedicated section for clarity - Removing stale references to `BaseEntity` <img width="1139" alt="image" src="https://user-images.githubusercontent.com/6445731/230470881-5a2b8e24-685b-4029-9737-1ca36792c079.png"> --------- Co-authored-by: Martin Adámek <banan23@gmail.com>
- Adding a warning icon to the upgrade notes about typescript - Separating `.load` into a dedicated section for clarity - Removing stale references to `BaseEntity` <img width="1139" alt="image" src="https://user-images.githubusercontent.com/6445731/230470881-5a2b8e24-685b-4029-9737-1ca36792c079.png"> --------- Co-authored-by: Martin Adámek <banan23@gmail.com>
- Adding a warning icon to the upgrade notes about typescript - Separating `.load` into a dedicated section for clarity - Removing stale references to `BaseEntity` <img width="1139" alt="image" src="https://user-images.githubusercontent.com/6445731/230470881-5a2b8e24-685b-4029-9737-1ca36792c079.png"> --------- Co-authored-by: Martin Adámek <banan23@gmail.com>
- Adding a warning icon to the upgrade notes about typescript - Separating `.load` into a dedicated section for clarity - Removing stale references to `BaseEntity` <img width="1139" alt="image" src="https://user-images.githubusercontent.com/6445731/230470881-5a2b8e24-685b-4029-9737-1ca36792c079.png"> --------- Co-authored-by: Martin Adámek <banan23@gmail.com>
- Adding a warning icon to the upgrade notes about typescript - Separating `.load` into a dedicated section for clarity - Removing stale references to `BaseEntity` <img width="1139" alt="image" src="https://user-images.githubusercontent.com/6445731/230470881-5a2b8e24-685b-4029-9737-1ca36792c079.png"> --------- Co-authored-by: Martin Adámek <banan23@gmail.com>
- Adding a warning icon to the upgrade notes about typescript - Separating `.load` into a dedicated section for clarity - Removing stale references to `BaseEntity` <img width="1139" alt="image" src="https://user-images.githubusercontent.com/6445731/230470881-5a2b8e24-685b-4029-9737-1ca36792c079.png"> --------- Co-authored-by: Martin Adámek <banan23@gmail.com>
- Adding a warning icon to the upgrade notes about typescript - Separating `.load` into a dedicated section for clarity - Removing stale references to `BaseEntity` <img width="1139" alt="image" src="https://user-images.githubusercontent.com/6445731/230470881-5a2b8e24-685b-4029-9737-1ca36792c079.png"> --------- Co-authored-by: Martin Adámek <banan23@gmail.com>
- Adding a warning icon to the upgrade notes about typescript - Separating `.load` into a dedicated section for clarity - Removing stale references to `BaseEntity` <img width="1139" alt="image" src="https://user-images.githubusercontent.com/6445731/230470881-5a2b8e24-685b-4029-9737-1ca36792c079.png"> --------- Co-authored-by: Martin Adámek <banan23@gmail.com>
.load
into a dedicated section for clarityBaseEntity