Open georgemoralis opened 7 years ago
btw my whole enum implementation was based on that
http://blog.chris-ritchie.com/2013/09/mapping-enums-with-fixed-id-in-jpa.html
I think in this case, JPA/Hibernate/EclipseLink sees the field as being an integer, not an enum. (The enum stuff in this situation is just a wrapper that the JPA layer doesn't see.) So Jinq expects the accessor method to return an integer as well. You would need to create a separate getter that uses an integer, and use that in your queries so that Jinq creates code that is consistent with what JPA/Hibernate/EclipseLink is expecting.
public int getEiditype() {
return this.eiditype;
}
Jinq only supports enums when you use normal JPA enums
yah i changed it to proper jpa enum to handle it properly without 2 getters and now it appears to work right thank you for your efford and help!
I have the following on my entity
private Integer eiditype;
public SpeciesType getEiditype() { return SpeciesType.getType(this.eiditype); }
When i use the following query
stream = stream.where(p -> p.getEiditype() == SpeciesType.SERVICE);
i get the following error
Caused by: org.jinq.rebased.org.objectweb.asm.tree.analysis.AnalyzerException: Unknown method prototype/eidi/EidiEntity:getEiditype()LprototypeERP/model/enums/SpeciesType; encountered
I tried with ids as well
stream = stream.where(p -> p.getEiditype().getId() == SpeciesType.SERVICE.getId());
but not working either , any idea?