Hi !
I got error every time I try to use find command pagination or ordering options.
Here is example of what I’m trying to do
cm find changeset "on repository 'MyRepo' order by date desc"
cm find changeset "on repository 'MyRepo'" order by date desc
cm find changeset "on repository 'MyRepo'" limit 5
cm find changeset "on repository 'MyRepo' limit 5"
Query error: line 1:xx missing EndOfFile
Plastic client version 10.0.16
Plastic server version 8.0.16
Hi, something like this should work:
cm find changeset limit 5 "on repository 'test@localhost:8087'"
Thanks for your fast reply.
It still doesn’t work but at least now I know where the error comes from
The server xxxx:8087 doesn't support sorting or pagination. Please upgrade the server.
Do you know which version of the server I need to make it work ?
Not very sure of the specific version but 8.0 is very old. Why don’t you upgrade to a more recent version?
We are using Plastic since version 8 and we are just affraid of loosing more than 5 years of work if the update goes wrong. But yes, we gonna thinkg about this.
Thanks again
There shouldn’t be a problem to upgrade to a recent version. Anyway, we always recommend doing periodical database backups, just in case.
Ran into the same issue on Cloud version of Plastic as well. Turns out you have to put query conditions before “on repository” clause, so
cm find changeset "on repository 'MyRepo' order by date desc limit 5"
should be
cm find changeset "order by date desc limit 5 on repository 'MyRepo'"
cm find --help
is confusing here as it puts “on repository” first in Usage:
Usage:
cm find <object_type>
[where <str_conditions>]
[on repository '<repspec>' | on repositories '<repspec1>','<repspec2>'[,...]]
[order by <sort_field> ['asc' | 'desc']]
[[limit <maxresults>] [offset <offset>]]
[--format=<str_format>] [--dateformat=<date_format>]
[--nototal] [--file=<dump_file>] [--xml]
[--encoding=<name>]
“on repository” should be always included at the end of the “cm find” query.
I’ve shared your feedback with the team because we should make it clear in the command help.
1 Like