-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Using Json as an example for custom datatype can be misleading #7906
Comments
Isn't this enough? https://book.cakephp.org/4/en/orm/saving-data.html#saving-complex-types |
I think what @MolbioUnige might be referring to is that Cake now ships with the JsonType, whereas I don't believe that was always the case. So, users might read these docs and create their own JsonType, not realizing that Cake already has one and their efforts were redundant. At $MYJOB we ran into this ourselves in a recent project. I think documenting EnumType in place of JsonType (perhaps with a notice that JsonType is already part of Cake) is a good choice because many PHP8 users, myself included, are eager to see an example of its usage. |
Then it would be best if we'd come up with another, not so straight forward example of a custom Database Type to replace the currently redundant JsonType |
There is the PointType example already, and yes @LordSimal the saving complex type explanation is enough |
A link "see Saving complex datatype" at some place along with @jamisonbryant suggestion about stating that Json is natively supported could be useful. |
You can also invent a custom type, e.g. YearType or alike: |
Issue Description
Using Json as an example for the custom type might make people think that Cakephp doesn't handle json natively. I found it a bit confusing. Instead, having a section explaining how to use the native JsonType, like the EnumType, would be nice.
The text was updated successfully, but these errors were encountered: