-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Moving typing from entity to mapping schema #7
Comments
It is actually already in schema, see section TYPECAST. The column type drives this value as default and tells the driver how to configure the database. |
Hmmm... In this case, my proposal becomes irrelevant =) |
I can also find your original comments about using one entity for two sources. This is possible as well, check Classless example in tests :) |
@wolfy-j I understood this after I started reading the source code =) Therefore, instead of closing the issue, I was just corrected it. |
OK. I will try to explain it all in the documentation but the hard separation between the entity and it's mapping was a very critical aspect of the design. I assume it will be more questions when we will describe it in details (60 pages :( ). Please let me know if you have any high-level questions in the meantime, I would glad to make sure that direction is correct and we do not miss anything. |
kk. We still have time to talk about this topic on phprussia conf ;) |
LOL, that too. |
I think that types should be defined in the schema, not in Entity. In this case, we can allow for more flexible behavior (have several different types in the same entity depending on the repository source). In that case, when we need to guarantee the types in entity, we can use the PHP 7.4+ properties typing.
Actual
Expected
The text was updated successfully, but these errors were encountered: