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

ModelQuery.latestVersion() no found any record #3788

Open
longsebo opened this issue Nov 29, 2023 · 1 comment
Open

ModelQuery.latestVersion() no found any record #3788

longsebo opened this issue Nov 29, 2023 · 1 comment

Comments

@longsebo
Copy link

Describe the bug
I use flowable 7.0 engine create a model success!
then use ModelQuery modelQuery = repositoryService.createModelQuery().latestVersion().orderByCreateTime().desc();
not found any record!
But use repositoryService.createModelQuery() found a record is correct!Why?
Expected behavior
ModelQuery modelQuery = repositoryService.createModelQuery().latestVersion().orderByCreateTime().desc();
modelQuery.count(); return a Numbers greater than 0

Code
ModelQuery modelQuery = repositoryService.createModelQuery().latestVersion().orderByCreateTime().desc();
// EXECUTE query
long pageTotal = modelQuery.count();
if (pageTotal <= 0) {
System.out.println('pageTotal:'+String.valueOf(pageTotal));
}
This result print pageTotal:0
Additional context
I are using Flowable within Spring Boot ,It's version is 7.0

@filiphr
Copy link
Contributor

filiphr commented Jan 2, 2024

How are you creating the models? Why are you using the ModelQuery?

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

No branches or pull requests

2 participants