Opened 16 years ago
Closed 16 years ago
#2523 closed enhancement (fixed)
pssibility to always used qualifed names for attributes
Reported by: | assefa | Owned by: | assefa |
---|---|---|---|
Priority: | normal | Milestone: | 5.2 release |
Component: | Input - Native SDE Support | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
This is en e-mail conversation between Assefa and Howard:
Hi There,
Working with mapserver/sde layers, we came across an issue where the attribute names used (ex for a querybyattributes) must be qualified if there is a Join done on the layer and non-qualified if there is no join. Note that this is documented. Do you see any advantage/problem to always be able to use qualified names either there is a join or not? At least be able for those who want it, to be able to have a setting so that qualified names are always used. (this would preserve the way it works now if there is nothing set)
Howard's answer
If I remember correctly, I had a lot of trouble with qualified names and joins with SDE. I settled with what we have now to attempt to preserve existing behavior for folks while still allowing in-database joins to happen. I would support adding some sort of PROCESSING item to switch on fully qualified names, or if there is enough support for 5.2, just moving to always returning and using qualified names (this would require mapfile changes for folks, however).
Change History (3)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
any objections if I apply this patch?
This is a possible patch that can be applied to have a processing value (PROCESSING "ATTRIBUTE_QUALIFIED=TRUE") that the user can set to always use qualified names. If the processing value is not set (or set to something other that TRUE) the current behavior is maintained. It was tested locally on my machine for such things as layer.getitem and querybyattributes.
Index: mapsde.c =================================================================== --- mapsde.c (revision 7396) +++ mapsde.c (working copy) @@ -267,7 +267,9 @@
+ proc_key = msLayerGetProcessingKey(layer,"ATTRIBUTE_QUALIFIED");
+ (proc_key && strcasecmp( proc_key, "TRUE") == 0)) {
@@ -1822,6 +1824,8 @@
+ char *proc_key = NULL; +
@@ -1935,7 +1939,10 @@
+ + proc_key = msLayerGetProcessingKey(layer,"ATTRIBUTE_QUALIFIED"); + if (!sde->join_table &&