Skip to content
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

Add ORDER BY to array queries #169

Closed
p-a-s-c-a-l opened this issue Jun 2, 2016 · 4 comments
Closed

Add ORDER BY to array queries #169

p-a-s-c-a-l opened this issue Jun 2, 2016 · 4 comments

Comments

@p-a-s-c-a-l
Copy link
Member

Add ORDER BY clause to all queries dealing with arrays to make sure that the order of array items is always the same among recurring requests to the same meta object. See e.g. ObjectFactory:799

From the documentation of SELECT:
"If the ORDER BY clause is specified, the returned rows are sorted in the specified order. If ORDER BY is not given, the rows are returned in whatever order the system finds fastest to produce."

@p-a-s-c-a-l
Copy link
Member Author

p-a-s-c-a-l commented Jun 3, 2016

Possibilities for ordering n-m arrays (ObjectFactory: 685)

  • by primary key of array table: arrayMetaClass.getPrimaryKey()
  • by id of array element: arrayMetaClass.getMemberAttributeInfos() -> find Attribute with with mai.IsForeignKey() == true.

@p-a-s-c-a-l
Copy link
Member Author

Possibilities for ordering n-m arrays (ObjectFactory: 799)

  • order by detailClass.getPrimaryKey()

p-a-s-c-a-l added a commit that referenced this issue Jun 6, 2016
p-a-s-c-a-l added a commit that referenced this issue Jun 6, 2016
@ci-cismet-de
Copy link
Member

Integrated branch 'feature/169-sort-arrays (eebf651)' into 'dev (c1f8474)' -- Build 345

p-a-s-c-a-l added a commit that referenced this issue Jun 6, 2016
@p-a-s-c-a-l
Copy link
Member Author

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants