emmanuel wrote:
Hum weird, I have tested on Postgres and it was working fine.
Open a JIRA issue with a runnable test case, I'll check that
Maybe the GroupEnum class could help you?
Seems to be an issue during the mapping of the 'group' into the query... The message "ERROR: operator does not exist: integer = bytea" seems to indicate that the userGroup column is correctly set to int4 but the compared value is interpreted as a 'bytea' type.
Can't it be possible there is a failure with the EnumUserType when getting the type 'Integer' of an enumeration, during a query?
If you really want to, I could create an exemple of this issue, but I think all the elements of the problem are there?
---
public enum GroupEnum implements Serializable {
SUPERUSER (0, "Super User"),
ITREQUEST_ADMIN (100, "IT Admin"),
ITREQUEST_USER (110, "IT User");
private String friendlyName;
private int level;
private GroupEnum(int level, String name) {
this.level = level;
this.friendlyName = name;
}
public boolean isSuperUser() {
return this == SUPERUSER;
}
public boolean isItAdmin() {
return this == ITREQUEST_ADMIN;
}
public boolean isItUser() {
return this == ITREQUEST_USER;
}
public int getLevel() {
return level;
}
public void setLevel(int level) {
this.level = level;
}
public String getFriendlyName() {
return friendlyName;
}
public void setFriendlyName(String friendlyName) {
this.friendlyName = friendlyName;
}
public static GroupEnum getByLevel(int level) {
for (GroupEnum grp : values()) {
if (grp.getLevel() == level)
return grp;
}
return null;
}
}