[Date Prev][Date Next] [Chronological] [Thread] [Top]

URGENT ! problem with back_sql



> Hi Dmitry,
> 
> we are using back_sql to access relational data saved within an oracle database. Everything works fine except for one problem. The ldap attribute names (column "name" in table "ldap_attr_mappings") is used within the preconstructed queries as is, leading to sql statements like the following:
> 
> select login.userid as uid from login where login.ident=?
> 
> 
> For Oracle, uid is a reserved word leading to an error. Of course, in this case, one could use "userid" instead of "uid"  but Oracle also complains when using attribute names like "smarti-addressid" complaining about the hyphen.
> 
> When saving all attribute names with a trailing and leading apostrophes ("), the sql statements looks like that and works:
> 
> select login.userid as "uid" from login where login.ident=?
> 
> 
> 
> But now, we get the next problem. When using such an attribute in a search filter (uid=test), backsql_process_filter() obviously compares the filter with the stored attribute names (including ") and reports that the named attribute is not defined for that object class.
> 
> 
> I guess the solution would be to introduce one more configuration setting to specify the character used for wrapping the alias name (I do not know how other db systems behave, so leaving it empty is also an option.
> 
> We need the back_sql feature in a current project, so it is quite urgent for us ;-//
> 
> TIA 
> 
> newtron AG
> 
> Nick Laqua
> Manager Software Development
> 
> Freiberger Straße 39 
> D 01067 Dresden
> Germany
> 
> phone: +49 (0) 351 4 39 58-130
> fax: +49(0) 351 4 39 58-177
> mobile: + 49(0) 171 87 81 303
> 
> Frankfurt - DRESDEN - Wien - Singapore
> 
> new trading online  - www.newtron.net
>