-
Notifications
You must be signed in to change notification settings - Fork 4
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
YAML mappings #37
YAML mappings #37
Conversation
jordonsc
commented
Nov 30, 2015
- Added YAML mapper
- Added map portation
- Added an entity locator for export and portation uses
- Solves issue Annotation metadata parser assumes all entities use annotations #36
What is the default behavior of __toString() for these YAML generated entity? And how to change it? |
An entity and a mapping are different things, this is confusing given that currently mappings are only supported via annotations - which is the mapping data & entity class in one. Now you would have normal classes with no annotations, and a separate YAML file that explains what each property and relationship, etc is. |
OK |
* @param string $class | ||
* @return string | ||
*/ | ||
protected function getTableForClass($class) |
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 potentially could substitute our mappings system we've implemented, right?
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.
Hmm, not what it's intended for (will discuss that with you in Slack).
That function is a helper for the managers sub-services - it just pulls entity metadata and gets the table name - you want the opposite. This problem though (which is the refs problem) is what this PR is heading down the direction of fixing. Although I'm still not sure how to support annotation mappings with the ref problem fixed (Yaml mappings can do it safely).
$data[Schema::COLUMN_ID] = true; | ||
} | ||
|
||
$default_getter = 'get'.Inflector::classify($column->getProperty()); |
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.
http://symfony.com/doc/current/components/property_access/introduction.html ? may be there are other places that can benefit from this? just a thought.
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.
Yeah Tony was telling me about that at lunch - I think changing the inflector might count as another PR, though.
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.
cool
👍 |