5 | | As far as I can tell, the driver does not give me the posibility to specify the |
6 | | feature_id column name. It seems that it is hardcoded to "OGR_FID" in the |
7 | | driver. So I created a view in Oracle with the OGR_FID column using my unique |
8 | | ID, but that didn't help - the driver does not support views. So I changed the |
9 | | ReadTableDefinition in ogrocitablelayer.cpp so that it supports views, and |
10 | | voila it works. |
| 3 | As far as I can tell, the driver does not give me the posibility to specify the feature_id column name. It seems that it is hardcoded to "OGR_FID" in the driver. So I created a view in Oracle with the OGR_FID column using my unique ID, but that didn't help - the driver does not support views. So I changed the |
| 4 | ReadTableDefinition in ogrocitablelayer.cpp so that it supports views, and voila it works. |
15 | | nStatus = |
16 | | OCIDescribeAny( poSession->hSvcCtx, poSession->hError, |
17 | | (dvoid *) pszTable, strlen(pszTable), OCI_OTYPE_NAME, |
18 | | OCI_DEFAULT, OCI_PTYPE_TABLE, poSession->hDescribe ); |
| 9 | {{{ |
| 10 | nStatus = OCIDescribeAny( poSession->hSvcCtx, poSession->hError, (dvoid *) pszTable, strlen(pszTable), OCI_OTYPE_NAME, OCI_DEFAULT, OCI_PTYPE_TABLE, poSession->hDescribe ); |
| 11 | |
| 12 | if( poSession->Failed( nStatus, "OCIDescribeAny" ) ) |
| 13 | return poDefn; |
| 14 | }}} |
| 15 | |
| 16 | Changed code: |
| 17 | {{{ |
| 18 | nStatus = OCIDescribeAny( poSession->hSvcCtx, poSession->hError, (dvoid *) pszTable, strlen(pszTable), OCI_OTYPE_NAME, OCI_DEFAULT, OCI_PTYPE_TABLE, poSession->hDescribe ); |
| 19 | |
| 20 | if( poSession->Failed( nStatus, "OCIDescribeAny" ) ) |
| 21 | { |
| 22 | nStatus = OCIDescribeAny( poSession->hSvcCtx, poSession->hError, (dvoid *) pszTable, strlen(pszTable), OCI_OTYPE_NAME, OCI_DEFAULT, OCI_PTYPE_VIEW, poSession->hDescribe ); |
| 23 | |
21 | | |
22 | | Changed code: |
23 | | nStatus = |
24 | | OCIDescribeAny( poSession->hSvcCtx, poSession->hError, |
25 | | (dvoid *) pszTable, strlen(pszTable), OCI_OTYPE_NAME, |
26 | | OCI_DEFAULT, OCI_PTYPE_TABLE, poSession->hDescribe ); |
27 | | if( poSession->Failed( nStatus, "OCIDescribeAny" ) ) |
28 | | { |
29 | | nStatus = |
30 | | OCIDescribeAny( poSession->hSvcCtx, poSession->hError, |
31 | | (dvoid *) pszTable, strlen(pszTable), OCI_OTYPE_NAME, |
32 | | OCI_DEFAULT, OCI_PTYPE_VIEW, poSession->hDescribe ); |
33 | | if( poSession->Failed( nStatus, "OCIDescribeAny" ) ) |
34 | | return poDefn; |
35 | | } |
36 | | |
| 26 | } |
| 27 | }}} |