necouchman commented on PR #902:
URL: https://github.com/apache/guacamole-client/pull/902#issuecomment-2002148741

   @mike-jumper 
   
   I'm working through the JDBC changes required to make case sensitivity 
configurable, and I'm getting a bit confused in some a couple of the mapper 
files. For example:
   
   
https://github.com/apache/guacamole-client/blob/3611be5c41b5c08d2dc224ff197274112eea0302/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/src/main/resources/org/apache/guacamole/auth/jdbc/permission/UserPermissionMapper.xml#L26-L32
   
   The `affected_name` column is labeled as a `_name`, not `_identifier`; 
however, it maps to the `object_identifier` column and has a type of `INTEGER`. 
If I look at the `ObjectPermissionModel` class, though:
   
   
https://github.com/apache/guacamole-client/blob/3611be5c41b5c08d2dc224ff197274112eea0302/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/permission/ObjectPermissionModel.java#L30-L33
   
   `objectIdentifier` has a type of `String`. So, shouldn't the jdbcType in the 
mapper file be `VARCHAR`, and not `INTEGER`?
   
   Furthermore, going a little further in that file, if I look at the 
`selectOne` query definition:
   
   
https://github.com/apache/guacamole-client/blob/3611be5c41b5c08d2dc224ff197274112eea0302/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/src/main/resources/org/apache/guacamole/auth/jdbc/permission/UserPermissionMapper.xml#L54-L74
   
   You can see, here, that we're selecting the columns `entity_id`, 
`permission`, and `name` into the aforementioned `UserPermissionResultMap`, but 
the `name` column coming out of the `guacamole_entity` table is definitely a 
`varchar` field, not an integer, but it's being returned as the user identifier 
(`objectIdentifier`) in that `ObjectPermissionModel` class.
   
   What am I missing, here?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to