-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
XML one-to-many order-by default direction isn't set #7141
Comments
@Awkan setting the default direction (if not set) in the driver is likely the correct approach. |
Awkan
added a commit
to Awkan/doctrine2
that referenced
this issue
Mar 20, 2018
Awkan
added a commit
to Awkan/doctrine2
that referenced
this issue
Mar 21, 2018
Awkan
added a commit
to Awkan/doctrine2
that referenced
this issue
Mar 22, 2018
Awkan
added a commit
to Awkan/doctrine2
that referenced
this issue
Mar 22, 2018
Majkl578
pushed a commit
to Majkl578/doctrine-orm
that referenced
this issue
Jun 29, 2018
Fixed by #7146 |
guilhermeblanco
pushed a commit
that referenced
this issue
May 30, 2019
lcobucci
pushed a commit
that referenced
this issue
Jun 17, 2019
lcobucci
pushed a commit
that referenced
this issue
Jun 17, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Context
I have a
oneToMany
relation between 2 entities. For example an Article which has many tags.My mapping is declared as XML.
Then, I want to get my tags ordered by name. For that, I have the following mapping in my
Article
:Problem
By default, this should sort my name field ASC (as mentionned in XSD file). However I have the exception
Invalid order by orientation specified for Tag#name
Way of solution
For the moment, adding explicitly my direction attribute works fine but the default value isn't very default
I've investigate about it and it's appear that during the mapping reading (https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php#L375), the default direction isn't set. Should be set it by default to this line ?
The text was updated successfully, but these errors were encountered: