-
Notifications
You must be signed in to change notification settings - Fork 72
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
bug on where(p->p.isReadOnly()==true) Could not analyze lambda code #77
Comments
I would have to see the full stack trace to see what the error is. I suspect the problem is that Jinq can't determine the name of your boolean methods. When you use field-based annotations in JPA, Jinq has to guess the names of the getter methods. For the field "isReadyOnly", I think Jinq is guessing that the getter method is either "isIsReadyOnly" or "getIsReadOnly" but the actual getter method is "isReadOnly." For this case, you will have to manually tell Jinq what the name of the getter method is
You might have to do this on all the entities that inherit from |
java.lang.IllegalArgumentException: Could not analyze lambda code |
i try your way ,but it also throw the same exception protected JinqJPAStreamProvider streams; @PersistenceUnit |
You can see from the stack trace here that it doesn’t recognize the isDeleted() method: Caused by: org.jinq.rebased.org.objectweb.asm.tree.analysis.AnalyzerException: Unknown method com/tencent/demo/model/dbs/DictionaryCategory:isDeleted()Z encountered Manually registering it should allow Jinq to recognize the method. I’m not sure why it’s not working for you. Are you sure you’re registering on the same JinqJPAStreamProvider that you are calling the query on? You register isDeleted on “streams”, but you use “this” to create the query. Do they refer to the same object? |
yes,i'am sure the same object.i copy them from difference file.the stream var is define in baseservice class,and use in the DictionaryService @my2iu the java code file is in the .zip |
I always get the convention wrong too. I think the official convention is that the variable is called Anyway, the problem is that when you call
|
ok,i get it,thanks |
JPAJinqStream query = this.streamAll(DictionaryCategory.class);
List list = query.where(p.isDeleted() == true).toList();
failure[Could not analyze lambda code]
use the isReadOnly also occur the same error
@my2iu
jdk:1.8.0_181
springboot:2.1.0.RELEASE
The text was updated successfully, but these errors were encountered: