-
-
Notifications
You must be signed in to change notification settings - Fork 505
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
Detect field type with property type #2661
Comments
Sounds useful and I think ORM had it for a while now. |
@IonBazan I haven't started investigating yet. Do so if you feel inspired. |
We already have that thanks to #2411 and @franmomu :) mongodb-odm/lib/Doctrine/ODM/MongoDB/Mapping/ClassMetadata.php Lines 2672 to 2679 in 8b542f4
|
Perfect. How could I have missed it despite it being well documented? One thing that could be improved is reading the phpdoc for |
Thanks @malarzm, looks like I forgot about this feature. Perhaps it could be extracted to a separate class as |
Feature Request
Summary
In metadata, the default type of fields is
string
, regardless of the type of field property. I propose to inspect the property types when the field type is not defined. The would only support simple types (maybe with extension point):Benefit: no need to declare the field type.
Usage
The text was updated successfully, but these errors were encountered: